Question

our site was hacked recently. we had backup , so we reverted and restricted site only to our ip , now we are trying to install all security patches. we installed 7405 , 5344 , 6482 patches. we cross checked it by below code in applied.patch.list

2016-08-03 19:22:57 UTC | SUPEE-7405 | CE_1.8.1.0 | v1.1 | 7abc9e2aeabfd6fe2adb9ec5aeaa1338e3100178 | Fri Feb 5 13:26:33 2016 +0200 | 7b9c8a8353510903624d8d9ce11b982811dd0df5..7abc9e2aeabfd6fe2adb9ec5aeaa1338e3100178
patching file app/code/core/Mage/Adminhtml/Helper/Sales.php
patching file app/code/core/Mage/Core/Model/Config.php
patching file app/code/core/Mage/Sales/Model/Quote/Item.php
patching file lib/Varien/File/Uploader.php


2016-08-03 19:49:41 UTC | SUPEE-5344 | EE_1.14.1.0 | v1 | a5c9abcb6a387aabd6b33ebcb79f6b7a97bbde77 | Thu Feb 5 19:14:49 2015 +0200 | v1.14.1.0..HEAD
patching file app/code/core/Mage/Admin/Model/Observer.php
patching file app/code/core/Mage/Core/Controller/Request/Http.php
Hunk #2 succeeded at 537 (offset -4 lines).
patching file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
patching file app/code/core/Mage/XmlConnect/Model/Observer.php
patching file lib/Varien/Db/Adapter/Pdo/Mysql.php


2016-08-03 19:55:03 UTC | SUPEE-6482 | CE_1.9.2.0 | v1 |  | Tue Jul 14 14:17:04 2015 +0300 |
patching file app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
Hunk #1 succeeded at 209 (offset -24 lines).
patching file app/code/core/Mage/Catalog/Model/Product/Api/V2.php

now 5994 , 6788 , 6285 patches are left.

Now when we include below code in patch.php file and ran in browser , we got below errror.

patch.php

<?php
print("<PRE>");
passthru("/bin/bash PATCH_SUPEE-5994_CE_1.6.0.0_v1-2015-05-15-04-34-46.sh");
print("</PRE>");
echo "Done";
?>

error :

Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php
patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
patching file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
patching file app/code/core/Mage/Customer/Model/Customer.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php
The next patch would create the file app/code/core/Mage/Install/Controller/Router/Install.php,
which already exists!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored
patching file app/code/core/Mage/Install/etc/config.xml
patching file app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php
patching file downloader/Maged/Model/Connect.php
patching file downloader/Maged/View.php
patching file downloader/template/connect/packages_prepare.phtml
patching file downloader/template/messages.phtml
patching file get.php
patching file lib/PEAR/PEAR/PEAR.php
The next patch would create the file lib/PEAR/PEAR/PEAR5.php,
which already exists!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored
patching file lib/Varien/Io/File.php
Done
Était-ce utile?

La solution

The patches have to be applied in the right order, starting with the lowest number, otherwise they fail as soon as they modify the same files.

So after you restored the original files, you should apply the patches in the following order:

  • APPSEC-212
  • SUPEE-1533
  • SUPEE-3762
  • SUPEE-5344
  • SUPEE-5994
  • SUPEE-6285
  • SUPEE-6482
  • SUPEE-6788
  • SUPEE-7405
  • SUPEE-7405 v1.1

See also: Magento 1.8.1.0 Patches

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top