cancel
Showing results for 
Search instead for 
Did you mean: 

Reverting Security Patch via Cronjob .. Possible?

Reverting Security Patch via Cronjob .. Possible?

Hello!

 

On my server, I have always used a quick one use cronjob to apply the magento patches, as I don't have access to SSH. It worked fine, however with this new patch that has come out (SUPEE-6482), it is requesting to revert patch SUPEE-6285 and apply the new one. I tried reverting via the cronjob by just running it again, and I get this:

 

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

patching file app/Mage.php
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/Mage.php.rej
patching file app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php.rej
patching file app/code/core/Mage/Adminhtml/Controller/Action.php
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/Controller/Action.php.rej
patching file app/code/core/Mage/Adminhtml/controllers/AjaxController.php
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.

And so on...

 

So my question, is if this is possible to be done this way, and if not, what other means would there be to revert the patch without using SSH? Thanks! 

2 REPLIES 2

Re: Reverting Security Patch via Cronjob .. Possible?

You only need to revert the SUPEE-6285 patch and apply the v2 (latest) one if your Magento version is 1.9.0.0-1.9.1.1 and you previously applied the patch before v2 came out.

 

You should be able to revert the patch also by calling it via cron, you just need to add a -R to the command so if your cron job command was:

 

30 3 * * * sh /var/www/webserver/patch.sh

 

then to revert use the cronjob command

 

30 3 * * * sh /var/www/webserver/patch.sh -R

Brian Wade
President / Senior Developer Cybersolutions LLC - LinkedIn Profile

Re: Reverting Security Patch via Cronjob .. Possible?

Thanks for the help!

 

I tried changing the CronJob within the control panel to include -R, however it doesn't seem as customizable, so the only place I edit that can make that change, is the file field, so then it begins looking for the file with -R on the end which obviously isn't the case. Is there something I can simply change within the patch file to automatically think to revert it instead of patch?