Patching SUPEE-7405 and SUPEE-7616

Thankfully, applying SUPEE-7405 and SUPEE-7616 is a relatively straightforward process (unlike 6788). The only thing to bear in mind is ensuring the dependencies are satisfied prior to application.

The security bundle includes protection against several security-related issues, fully documented https://magento.com/security/patches/supee-7405. Including APPSEC-1177, identified by Sonassi as part of our commitment to Magento security.

Where to download

Its best downloading the patch from the Magento.com download section - however, you can also use our Magento download mirror if you know the filename you need.

Dependencies

Of course, your Magento store should have all patches applied; both security and feature patches. But sometimes its possible for one to slip through the net - or have been deemed unimportant at the time.

SUPEE-7405 (Security) requirements

  • PHP 5.4
  • SUPEE-2629 (PHP 5.4 compatibility patch)

SUPEE-7616 (USPS Update) requirements

  • SUPEE-6237
  • SUPEE-4291/4334
  • SUPEE-1868

Applying the patches

Thankfully, applying the patch itself is no different to the normal Magento patch process. I'd recommend doing this in staging/development before attempting on live (if you don't have a dev. site follow this guide to create one).

  1. Download the patch files to your computer and upload to the document root of your store
  2. Check the patch dependencies, and be prepared to patch each as necessary.
    Copy and paste the following commands to determine if the patch is required,

    [ -f "app/code/core/Zend/Pdf/FileParserDataSource.php" ] && echo "SUPEE-2629: OK" || echo "SUPEE-2629: This patch needs applying"
    [ -f "app/code/core/Mage/Usa/sql/usa_setup/upgrade-1.6.0.1.1.1-1.6.0.1.1.2.php" ] && echo "SUPEE-1868: OK" || echo "SUPEE-1868: This patch needs applying"
    grep -q "0_FCPC" app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php && echo "SUPEE-4291: OK" || echo "SUPEE-4291: This patch needs applying"
  3. Ensure your PHP version is a minimum of 5.4, if it isn't contact your hosting provider to upgrade,

    php -v
    PHP 5.4.45-1 (cli) (built: Sep  4 2015 23:33:03)
    Copyright (c) 1997-2014 The PHP Group
  4. Execute the patch file(s),

     cd /microcloud/data/domains/example/domains/example.com/http
     bash supee-2629.sh     (optional)
     bash supee-1868.sh     (optional)
     bash supee-4291.sh     (optional)
     bash supee-7616.sh
     bash supee-7405.sh

At this stage, the all patches should be successfully applied