Category: Security

  • Embedding PHP in Content

    Would you like to embed and run some PHP code in a blog post? Need to include a PHP file in a sidebar widget? Recently discovered this curious plugin? Don’t, you’re about to make an awful mistake. Lets walk through why it’s bad, and what you should be doing instead. Why Might Somebody Embed PHP? Perhaps you…

  • Escaping the Unsecure

    Part of my job at WordPress VIP is review. It takes up a lot of my time, and it’s critical work. Before code reaches our servers it needs to be vetted and peer reviewed to vouch that it’s fast, safe, and secure. Every developer makes mistakes ( even VIP developers ), so we peer review…

  • Clients Who Upload Huge Photos & Decompression Bombs

    Sometimes a client makes a blog post, and puts a photo in the middle. All good so far, until you realise the client has dragged an image from their brand new camera expecting a 10 Megapixel image to work. This is usually when people start talking about upload max file size limits, but this is…

  • Emailing on Image Attachment Uploads

    Sometimes it’s useful to know when an image or audio attachment is added. Here I’ll outline how to send an emailwhen it happens. How It Works We start by hooking into add_attachment, and grabbing the user IDs of all administrators: // send to admins of the current blog/site $args = array(); $args[0] = ‘user_email’; $wp_user_search…

  • WordPress Flow Charts & Diagrams

    There’s a number of WordPress flow charts and diagrams in the community, to which the phrase worth their own weight in gold does no justice. For that adage to be true these charts would be so dense no light would reach them, rendering them utterly useless. So I’ve gathered a few of the more notable…

  • ‘Hacker’ issues WP Pull Request on GitHub for PHP Shell

    At the beginning of September, a user by the name of  ‘maxymax’ forked WordPress, added a PHP Shell to the twentyten theme, and made a pull request to merge back in to the official release. https://github.com/maxymax/WordPress/commit/2fa93590c7881fab043be7b8b51358894dbc1466 Suffice to say the inclusion of Saudi Shell v1.0 in TwentyTen may not have been the best idea, nevermind…