JUN 01 2017

How to install SUPEE-9767

May 31, 2017: Community Edition 1.9.3.3 and SUPEE-9767 Security Enhancements – 5/31/2017.

New SUPEE-9767 patch can be downloaded as usual from Downloads page:
https://magento.com/tech-resources/download#download2014 or installed as a regular Magento upgrade via Downloader (it is included in Magento 1.9.3.3 version).

You can install it in the same way as previous patches or by upgrading to Magento 1.9.3.3.

To apply the patch you need SSH access (shell access actually, SSH is just most used way to get shell access) to the server. If you have no SSH access, you can refer to How to apply SUPEE-9767 without SSH.

If you wish to save time and have us to install these patches for you, simply click here to order installation.

Step 0: Preparations

Note: Make sure to Disable Magento Compiler at System > Configuration > Tools > Magento Compiler and clear compiled cache.

Step 1: Verify your Magento version

$ grep -A6 'static function getVersionInfo' app/Mage.php
    public static function getVersionInfo()
    {
        return array(
            'major'     => '1',
            'minor'     => '9',
            'revision'  => '3',
            'patch'     => '1',

As you can see in the example, it is Magento 1.9.3.1

Step 2: Download corresponding patch

The patch should be downloaded from https://magento.com/tech-resources/download#download2014

Make sure to get the right file corresponding to your Magento version.

Step 3: Disable Symlinks setting

In Magento backend navigate to System > Configuration > Advanced > Developer > Template Settings > Enable Symlinks and set it to No, if it is not set already:
template-symlinks-setting-in-magento

Step 4: Place patches into Magento Root directory

Upload your files into Magento root directory. It is important to place patch files directly into Magento root directory and execute it also directly in Magento root directory.

$ ls -1 .
PATCH_SUPEE-9767_CE_1.9.3.2_v1-2017-05-25-09-03-28.sh
app
cron.php
downloader
errors
favicon.ico
index.php
js
lib
mage
media
pkginfo
robots.txt
shell
skin
var

 

Step 5: Run the patches

$ bash ./PATCH_SUPEE-9767_CE_1.9.3.2_v1-2017-05-25-09-03-28.sh
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

 

Step 6 (optional): Enable Form Key Validation On Checkout

To take all advantages of SUPEE-9767 patch it is recommended to enable form key verification for checkout at System > Configuration > Advanced > Admin > Security > Enable Form Key Validation On Checkout.

Note: Make sure that corresponding checkout template phtml files in your custom theme have form key fields included.

These fields were added in this patch into default themes, so if you use default theme (base / rwd) or your theme does not override checkout pages, then you can enable Form Key Validation On Checkout right away. Otherwise, the following template files in your custom theme should be checked:

template/checkout/cart/shipping.phtml
template/checkout/multishipping/billing.phtml
template/checkout/multishipping/shipping.phtml
template/checkout/multishipping/addresses.phtml
template/checkout/onepage/billing.phtml
template/checkout/onepage/payment.phtml
template/checkout/onepage/shipping.phtml
template/checkout/onepage/shipping_method.phtml
template/persistent/checkout/onepage/billing.phtml

These files should include formkey line and you can add it just like in default template files:

--- app/design/frontend/base/default/template/checkout/onepage/payment.phtml
+++ app/design/frontend/base/default/template/checkout/onepage/payment.phtml
@@ -35,6 +35,7 @@
 <form action="" id="co-payment-form">
     <fieldset>
         <?php echo $this->getChildHtml('methods') ?>
+        <?php echo $this->getBlockHtml('formkey') ?>
     </fieldset>
 </form>
 <div class="tool-tip" id="payment-tool-tip" style="display:none;">

 

Step 7: Verification and flush of Magento PHP opcode cache

Flush Magento caches: Navigate in Magento backend to System > Cache Management and flush Magento cache and CSS/JS caches.

If you use PHP opcode caches (OPCache/APC/XCache/eAccelerator) make sure to flush it after patching (or restart webserver), otherwise code will continue to run from caches.

Test that your store is working. Test Checkout process.

If you have any difficulties with applying the patches please let us know in comments, so we can find the solution together.

 

Posted in: Magento Maintenance

How to install SUPEE-9767
21 votes, 4.76 avg. rating (94% score)
  • Vicky

    I don’t seem to have Symlinks in my admin. I’m on CE 1.9.3.2

  • leandrocosas

    Excellent article. Adding to information that if you use a custom /skin/frontend//default/js/opcheckout.js, you have to change it too, adding the line about form_key.

    if (elements[i].name==’payment[method]’ || elements[i].name == ‘form_key’) {