0

I'm currently attempting to install some security patches on a Magento 2.3.6 instance and don't seem to be able to apply them.

I'm using the files from the following page:

https://support.magento.com/hc/en-us/articles/4426353041293-Security-updates-available-for-Adobe-Com

I downloaded the two patches which it said were compatible for 2.3.4-p2 - 2.4.2-p2 and I've loaded them into my root directory as per the image below:

enter image description here

I'm using SSH via Putty, but when I run the patch command

patch -p2 < MDVA-43443_EE_2.4.2-p2_v1.patch

I keep getting the following messages

httpdocs$ patch -p2 < MDVA-43443_EE_2.4.2-p2_v1.patch can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php |index 88b204307f2..52b1018e1af 100644 |--- a/app/code/Magento/Email/Model/Template/Filter.php |+++ b/app/code/Magento/Email/Model/Template/Filter.php -------------------------- File to patch: Skip this patch? [y] y Skipping patch. 13 out of 13 hunks ignored can't find file to patch at input line 222 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/DependDirective.php b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/DependDirective.php |index f557f7465b5..83345acd6e5 100644 |--- a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/DependDirective.php |+++ b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/DependDirective.php -------------------------- File to patch: Skip this patch? [y] y Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 259 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/ForDirective.php b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/ForDirective.php |index 2b51185b1b5..41cd58118fd 100644 |--- a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/ForDirective.php |+++ b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/ForDirective.php -------------------------- File to patch: Skip this patch? [y] y Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 297 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/IfDirective.php b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/IfDirective.php |index 7fedc7946f2..469dae71d06 100644 |--- a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/IfDirective.php |+++ b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/IfDirective.php -------------------------- File to patch: Skip this patch? [y] y Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 334 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/SimpleDirective.php b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/SimpleDirective.php |index 9f4b30d0c96..b9280aec283 100644 |--- a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/SimpleDirective.php |+++ b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/SimpleDirective.php -------------------------- File to patch: Skip this patch? [y] y Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 356 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/VarDirective.php b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/VarDirective.php |index 78034d70ba5..a7d6790acc7 100644 |--- a/lib/internal/Magento/Framework/Filter/DirectiveProcessor/VarDirective.php |+++ b/lib/internal/Magento/Framework/Filter/DirectiveProcessor/VarDirective.php -------------------------- File to patch: Skip this patch? [y] y Skipping patch. 1 out of 1 hunk ignored

This happens regardless of whether I use -p1 or -p2.

Can anyone tell me what I'm doing wrong here please?

Update

Thanks to Shyam for their advice.

Applying the "Composer" patches in order using the patch -p1 command appears to have successfully installed the patches

1 Answer 1

2

I have tried to apply the following patch it works for me without any error,

enter image description here

Thanks & Regards,

5
  • Hello. I tried this one and got the same error using p2 but p1 came up with patch: **** Can't create file 2.orig : Too many open files patch: **** Can't create file 2.origSegmentation fault (core dumped)
    – CJNotts
    Apr 22 at 12:42
  • Hello try with patch -p1 also make sure MDVA-43395 patch first, and then MDVA-43443 on top of it.
    – shyam
    Apr 22 at 12:47
  • Hello. I'm using the Open source (community) version of Magento. should I still use the patches with COMPOSER in them?
    – CJNotts
    Apr 22 at 12:51
  • Yes, you need to apply
    – shyam
    Apr 22 at 13:02
  • Hello. Thank you. This seems to have applied the patches now.
    – CJNotts
    Apr 22 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.