From 61a2dcd7c8317f43279eb3c8a2ba7e9553f53bc2 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Thu, 19 Mar 2020 13:38:09 +0200 Subject: [PATCH 01/19] security-package/issues/140: Link "Read instructions on how to generate signature" in Store-Configuration is incorrect. --- Securitytxt/Model/Config/Signature.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Securitytxt/Model/Config/Signature.php b/Securitytxt/Model/Config/Signature.php index 4b604ae3..150ff252 100644 --- a/Securitytxt/Model/Config/Signature.php +++ b/Securitytxt/Model/Config/Signature.php @@ -24,7 +24,7 @@ class Signature implements CommentInterface */ public function getCommentText($elementValue): string { - return " + return " Read instructions on how to generate signature "; } From 0ae2578a4edbdeb7427edc7e4705e3863a8c7ac4 Mon Sep 17 00:00:00 2001 From: Alexander Steshuk Date: Tue, 31 Mar 2020 15:39:58 +0300 Subject: [PATCH 02/19] security-package/issues/171: Update for system.xml --- Securitytxt/etc/adminhtml/system.xml | 3 +-- Securitytxt/etc/config.xml | 17 +++++++++++++++++ Securitytxt/i18n/en_US.csv | 3 +-- 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 Securitytxt/etc/config.xml diff --git a/Securitytxt/etc/adminhtml/system.xml b/Securitytxt/etc/adminhtml/system.xml index c636be88..1b6cac57 100644 --- a/Securitytxt/etc/adminhtml/system.xml +++ b/Securitytxt/etc/adminhtml/system.xml @@ -79,7 +79,6 @@ showInWebsite="1" showInStore="1"> validate-url validate-no-html-tags - Example: https://example.com/security-policy.html @@ -90,4 +89,4 @@ - \ No newline at end of file + diff --git a/Securitytxt/etc/config.xml b/Securitytxt/etc/config.xml new file mode 100644 index 00000000..c2b3a47a --- /dev/null +++ b/Securitytxt/etc/config.xml @@ -0,0 +1,17 @@ + + + + + + + https://magento.com/security + + + + diff --git a/Securitytxt/i18n/en_US.csv b/Securitytxt/i18n/en_US.csv index e3062d2c..104a8849 100644 --- a/Securitytxt/i18n/en_US.csv +++ b/Securitytxt/i18n/en_US.csv @@ -25,5 +25,4 @@ Preferred-Languages,Preferred-Languages Hiring,Hiring "Example: https://example.com/jobs.html","Example: https://example.com/jobs.html" Policy,Policy -"Example: https://example.com/security-policy.html","Example: https://example.com/security-policy.html" -Signature,Signature \ No newline at end of file +Signature,Signature From 0e2f4ec7a3d8d1af1627d522a4a85d520fc0288d Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Wed, 1 Apr 2020 14:29:54 +0300 Subject: [PATCH 03/19] security-package/issues/140: Link "Read instructions on how to generate signature" in Store-Configuration is incorrect. --- Securitytxt/Model/Config/Signature.php | 16 +++++++++++++++- Securitytxt/etc/di.xml | 9 ++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Securitytxt/Model/Config/Signature.php b/Securitytxt/Model/Config/Signature.php index 150ff252..59a740c1 100644 --- a/Securitytxt/Model/Config/Signature.php +++ b/Securitytxt/Model/Config/Signature.php @@ -15,6 +15,20 @@ */ class Signature implements CommentInterface { + /** + * @var string + */ + private $instructionLink; + + /** + * @param string $instructionLink + */ + public function __construct( + string $instructionLink = '' + ) { + $this->instructionLink = $instructionLink; + } + /** * Get comment for signature field of security txt extension. * @@ -24,7 +38,7 @@ class Signature implements CommentInterface */ public function getCommentText($elementValue): string { - return " + return " Read instructions on how to generate signature "; } diff --git a/Securitytxt/etc/di.xml b/Securitytxt/etc/di.xml index 19d2a5d1..4c44f1e2 100644 --- a/Securitytxt/etc/di.xml +++ b/Securitytxt/etc/di.xml @@ -22,4 +22,11 @@ securitytxtResultPageFactory - \ No newline at end of file + + + + https://github.com/magento/security-package/blob/1.0-develop/Securitytxt/README.md + + + + From 8153e976dede2b343612c26ac12bf65a37a8740f Mon Sep 17 00:00:00 2001 From: Alexander Steshuk Date: Tue, 7 Apr 2020 16:48:50 +0300 Subject: [PATCH 04/19] security-package/issues/188: Added Notice message to system.xml. --- .../System/Config/Form/Field/Notice.php | 34 +++++++++++++++++++ ReCaptchaCustomer/etc/adminhtml/system.xml | 4 +++ ReCaptchaUser/etc/adminhtml/system.xml | 8 +++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php diff --git a/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php b/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php new file mode 100644 index 00000000..6b21aeb0 --- /dev/null +++ b/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php @@ -0,0 +1,34 @@ +' . '' . __('Important:') . ' ' . '' + . ' ' . __('Please note, for reCAPTCHA to be enabled, + the valid "Google API Website Key" and "Google API Secret Key" fields are required.') . '' . ''; + + return $this->_decorateRowHtml($element, $html); + } +} diff --git a/ReCaptchaCustomer/etc/adminhtml/system.xml b/ReCaptchaCustomer/etc/adminhtml/system.xml index a9ed7e6d..d68a9045 100644 --- a/ReCaptchaCustomer/etc/adminhtml/system.xml +++ b/ReCaptchaCustomer/etc/adminhtml/system.xml @@ -10,6 +10,10 @@
+ + Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice + diff --git a/ReCaptchaUser/etc/adminhtml/system.xml b/ReCaptchaUser/etc/adminhtml/system.xml index e90f4d4a..88560fff 100644 --- a/ReCaptchaUser/etc/adminhtml/system.xml +++ b/ReCaptchaUser/etc/adminhtml/system.xml @@ -10,13 +10,17 @@
- + Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice + + Magento\ReCaptchaAdminUi\Model\OptionSource\Type - Magento\ReCaptchaAdminUi\Model\OptionSource\Type From 02df8799c58ca64f26d434585b6be497ee4772f5 Mon Sep 17 00:00:00 2001 From: Alexander Steshuk Date: Tue, 7 Apr 2020 17:00:48 +0300 Subject: [PATCH 05/19] security-package/issues/188: Added CSS styles. --- .../Adminhtml/System/Config/Form/Field/Notice.php | 4 ++-- .../view/adminhtml/web/css/source/_module.less | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less diff --git a/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php b/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php index 6b21aeb0..477a2919 100644 --- a/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php +++ b/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php @@ -25,9 +25,9 @@ class Notice extends Field */ public function render(AbstractElement $element) { - $html = '' . '' . __('Important:') . ' ' . '' + $html = '

' . '' . __('Important:') . ' ' . '' . ' ' . __('Please note, for reCAPTCHA to be enabled, - the valid "Google API Website Key" and "Google API Secret Key" fields are required.') . '' . ''; + the valid "Google API Website Key" and "Google API Secret Key" fields are required.') . '' . '

'; return $this->_decorateRowHtml($element, $html); } diff --git a/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less b/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less new file mode 100644 index 00000000..d783926f --- /dev/null +++ b/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less @@ -0,0 +1,11 @@ +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +#recaptcha_frontend_type_for, +#recaptcha_backend_type_for +{ + strong { + color: @grid-severity-critical-color; + } +} From 74cc5d9c94a7884cc557a14976fce59d51635366 Mon Sep 17 00:00:00 2001 From: Alexander Steshuk Date: Thu, 9 Apr 2020 13:16:21 +0300 Subject: [PATCH 06/19] Fixed static test. --- .../Block/Adminhtml/System/Config/Form/Field/Notice.php | 4 ++-- ReCaptchaAdminUi/composer.json | 1 + ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php b/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php index 477a2919..9a3b6032 100644 --- a/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php +++ b/ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field/Notice.php @@ -25,8 +25,8 @@ class Notice extends Field */ public function render(AbstractElement $element) { - $html = '

' . '' . __('Important:') . ' ' . '' - . ' ' . __('Please note, for reCAPTCHA to be enabled, + $html = '

' . '' . __('Important:') + . ' ' . '' . ' ' . __('Please note, for reCAPTCHA to be enabled, the valid "Google API Website Key" and "Google API Secret Key" fields are required.') . '' . '

'; return $this->_decorateRowHtml($element, $html); diff --git a/ReCaptchaAdminUi/composer.json b/ReCaptchaAdminUi/composer.json index 005a9b9a..6bdebd70 100644 --- a/ReCaptchaAdminUi/composer.json +++ b/ReCaptchaAdminUi/composer.json @@ -4,6 +4,7 @@ "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", + "magento/module-config": "*", "magento/module-re-captcha-ui": "*" }, "type": "magento2-module", diff --git a/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less b/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less index d783926f..aea1cb28 100644 --- a/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less +++ b/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less @@ -2,9 +2,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -#recaptcha_frontend_type_for, -#recaptcha_backend_type_for -{ +.recaptcha_frontend_type_for_recaptcha_backend_info_heading_notice, +.recaptcha_frontend_type_for_recaptcha_frontend_info_heading_notice { strong { color: @grid-severity-critical-color; } From 1ce2a28110d921492033f716642f7ecbd2b000dd Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Fri, 17 Apr 2020 11:54:45 -0500 Subject: [PATCH 07/19] Set 1.0.0 version for packaging --- ReCaptchaAdminUi/composer.json | 1 + ReCaptchaCheckout/composer.json | 1 + ReCaptchaContact/composer.json | 1 + ReCaptchaCustomer/composer.json | 1 + ReCaptchaFrontendUi/composer.json | 1 + ReCaptchaMigration/composer.json | 1 + ReCaptchaNewsletter/composer.json | 1 + ReCaptchaPaypal/composer.json | 1 + ReCaptchaReview/composer.json | 1 + ReCaptchaSendFriend/composer.json | 1 + ReCaptchaUi/composer.json | 1 + ReCaptchaUser/composer.json | 1 + ReCaptchaValidation/composer.json | 1 + ReCaptchaValidationApi/composer.json | 1 + ReCaptchaVersion2Checkbox/composer.json | 1 + ReCaptchaVersion2Invisible/composer.json | 1 + ReCaptchaVersion3Invisible/composer.json | 1 + Securitytxt/composer.json | 1 + _metapackage/composer.json | 37 ++++++++++++------------ 19 files changed, 37 insertions(+), 18 deletions(-) diff --git a/ReCaptchaAdminUi/composer.json b/ReCaptchaAdminUi/composer.json index 005a9b9a..92454e41 100644 --- a/ReCaptchaAdminUi/composer.json +++ b/ReCaptchaAdminUi/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-admin-ui", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaCheckout/composer.json b/ReCaptchaCheckout/composer.json index 33c10ffc..cd4e00b3 100644 --- a/ReCaptchaCheckout/composer.json +++ b/ReCaptchaCheckout/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-checkout", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaContact/composer.json b/ReCaptchaContact/composer.json index 1e25f817..db8ccdfc 100644 --- a/ReCaptchaContact/composer.json +++ b/ReCaptchaContact/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-contact", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaCustomer/composer.json b/ReCaptchaCustomer/composer.json index c7df22e4..3efbd2b4 100644 --- a/ReCaptchaCustomer/composer.json +++ b/ReCaptchaCustomer/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-customer", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaFrontendUi/composer.json b/ReCaptchaFrontendUi/composer.json index 102a88c2..59ce87af 100644 --- a/ReCaptchaFrontendUi/composer.json +++ b/ReCaptchaFrontendUi/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-frontend-ui", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaMigration/composer.json b/ReCaptchaMigration/composer.json index 40b3277a..c3ca9e84 100644 --- a/ReCaptchaMigration/composer.json +++ b/ReCaptchaMigration/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-migration", "description": "Google reCAPTCHA config migration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaNewsletter/composer.json b/ReCaptchaNewsletter/composer.json index c70c2f0a..c2175098 100644 --- a/ReCaptchaNewsletter/composer.json +++ b/ReCaptchaNewsletter/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-newsletter", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaPaypal/composer.json b/ReCaptchaPaypal/composer.json index 4429c6ed..bc65ef05 100644 --- a/ReCaptchaPaypal/composer.json +++ b/ReCaptchaPaypal/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-paypal", "description": "Google reCaptcha integration for Magento2 PayPal PayflowPro payment form", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaReview/composer.json b/ReCaptchaReview/composer.json index 73d8795c..6d82fc8a 100644 --- a/ReCaptchaReview/composer.json +++ b/ReCaptchaReview/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-review", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaSendFriend/composer.json b/ReCaptchaSendFriend/composer.json index 68f59315..d23ce36c 100644 --- a/ReCaptchaSendFriend/composer.json +++ b/ReCaptchaSendFriend/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-send-friend", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaUi/composer.json b/ReCaptchaUi/composer.json index 3ad26a8c..1f7c1b4c 100644 --- a/ReCaptchaUi/composer.json +++ b/ReCaptchaUi/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-ui", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaUser/composer.json b/ReCaptchaUser/composer.json index 8dfff32b..fe4f2420 100644 --- a/ReCaptchaUser/composer.json +++ b/ReCaptchaUser/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-user", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaValidation/composer.json b/ReCaptchaValidation/composer.json index 3a76b6c9..8f246669 100644 --- a/ReCaptchaValidation/composer.json +++ b/ReCaptchaValidation/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-validation", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaValidationApi/composer.json b/ReCaptchaValidationApi/composer.json index c06f316c..872e374c 100644 --- a/ReCaptchaValidationApi/composer.json +++ b/ReCaptchaValidationApi/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-validation-api", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*" diff --git a/ReCaptchaVersion2Checkbox/composer.json b/ReCaptchaVersion2Checkbox/composer.json index 8acd468d..6b723625 100644 --- a/ReCaptchaVersion2Checkbox/composer.json +++ b/ReCaptchaVersion2Checkbox/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-version-2-checkbox", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaVersion2Invisible/composer.json b/ReCaptchaVersion2Invisible/composer.json index 5f95f3b5..6ec110ee 100644 --- a/ReCaptchaVersion2Invisible/composer.json +++ b/ReCaptchaVersion2Invisible/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-version-2-invisible", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/ReCaptchaVersion3Invisible/composer.json b/ReCaptchaVersion3Invisible/composer.json index 3a39ea00..70b95740 100644 --- a/ReCaptchaVersion3Invisible/composer.json +++ b/ReCaptchaVersion3Invisible/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-re-captcha-version-3-invisible", "description": "Google reCAPTCHA integration for Magento2", + "version": "1.0.0", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", diff --git a/Securitytxt/composer.json b/Securitytxt/composer.json index 4a22e423..bca93c04 100644 --- a/Securitytxt/composer.json +++ b/Securitytxt/composer.json @@ -1,6 +1,7 @@ { "name": "magento/module-securitytxt", "description": "Security.txt file for Magento 2 websites", + "version": "1.0.0", "type": "magento2-module", "require": { "php": "~7.1.3||~7.2.0||~7.3.0", diff --git a/_metapackage/composer.json b/_metapackage/composer.json index c169aafd..7d7d6cf4 100644 --- a/_metapackage/composer.json +++ b/_metapackage/composer.json @@ -1,26 +1,27 @@ { "name": "magento/security-package", "description": "Magento Security Package", + "version": "1.0.0", "type": "metapackage", "require": { - "magento/module-re-captcha-admin-ui": "*", - "magento/module-re-captcha-checkout": "*", - "magento/module-re-captcha-contact": "*", - "magento/module-re-captcha-customer": "*", - "magento/module-re-captcha-frontend-ui": "*", - "magento/module-re-captcha-migration": "*", - "magento/module-re-captcha-newsletter": "*", - "magento/module-re-captcha-paypal": "*", - "magento/module-re-captcha-review": "*", - "magento/module-re-captcha-send-friend": "*", - "magento/module-re-captcha-ui": "*", - "magento/module-re-captcha-user": "*", - "magento/module-re-captcha-validation": "*", - "magento/module-re-captcha-validation-api": "*", - "magento/module-re-captcha-version-2-checkbox": "*", - "magento/module-re-captcha-version-2-invisible": "*", - "magento/module-re-captcha-version-3-invisible": "*", - "magento/module-securitytxt": "*", + "magento/module-re-captcha-admin-ui": "1.0.0", + "magento/module-re-captcha-checkout": "1.0.0", + "magento/module-re-captcha-contact": "1.0.0", + "magento/module-re-captcha-customer": "1.0.0", + "magento/module-re-captcha-frontend-ui": "1.0.0", + "magento/module-re-captcha-migration": "1.0.0", + "magento/module-re-captcha-newsletter": "1.0.0", + "magento/module-re-captcha-paypal": "1.0.0", + "magento/module-re-captcha-review": "1.0.0", + "magento/module-re-captcha-send-friend": "1.0.0", + "magento/module-re-captcha-ui": "1.0.0", + "magento/module-re-captcha-user": "1.0.0", + "magento/module-re-captcha-validation": "1.0.0", + "magento/module-re-captcha-validation-api": "1.0.0", + "magento/module-re-captcha-version-2-checkbox": "1.0.0", + "magento/module-re-captcha-version-2-invisible": "1.0.0", + "magento/module-re-captcha-version-3-invisible": "1.0.0", + "magento/module-securitytxt": "1.0.0", "google/recaptcha": "^1.2" } } From 8e61c2e1e008180aff8a1b6d7406536d277b479b Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Fri, 17 Apr 2020 12:39:56 -0500 Subject: [PATCH 08/19] magento/security-package#206: PHP 7.4 support --- ReCaptchaAdminUi/composer.json | 2 +- ReCaptchaCheckout/composer.json | 2 +- ReCaptchaContact/composer.json | 2 +- ReCaptchaCustomer/composer.json | 2 +- ReCaptchaFrontendUi/composer.json | 2 +- ReCaptchaMigration/composer.json | 2 +- ReCaptchaNewsletter/composer.json | 2 +- ReCaptchaPaypal/composer.json | 2 +- ReCaptchaReview/composer.json | 2 +- ReCaptchaSendFriend/composer.json | 2 +- ReCaptchaUi/composer.json | 2 +- ReCaptchaUser/composer.json | 2 +- ReCaptchaValidation/composer.json | 2 +- ReCaptchaValidationApi/composer.json | 2 +- ReCaptchaVersion2Checkbox/composer.json | 2 +- ReCaptchaVersion2Invisible/composer.json | 2 +- ReCaptchaVersion3Invisible/composer.json | 2 +- Securitytxt/composer.json | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ReCaptchaAdminUi/composer.json b/ReCaptchaAdminUi/composer.json index 92454e41..9060968f 100644 --- a/ReCaptchaAdminUi/composer.json +++ b/ReCaptchaAdminUi/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaCheckout/composer.json b/ReCaptchaCheckout/composer.json index cd4e00b3..352d4be8 100644 --- a/ReCaptchaCheckout/composer.json +++ b/ReCaptchaCheckout/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-checkout": "*", "magento/module-re-captcha-ui": "*" diff --git a/ReCaptchaContact/composer.json b/ReCaptchaContact/composer.json index db8ccdfc..7a99a61f 100644 --- a/ReCaptchaContact/composer.json +++ b/ReCaptchaContact/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaCustomer/composer.json b/ReCaptchaCustomer/composer.json index 3efbd2b4..63f07f6e 100644 --- a/ReCaptchaCustomer/composer.json +++ b/ReCaptchaCustomer/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-customer": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaFrontendUi/composer.json b/ReCaptchaFrontendUi/composer.json index 59ce87af..f7b5abe4 100644 --- a/ReCaptchaFrontendUi/composer.json +++ b/ReCaptchaFrontendUi/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*" diff --git a/ReCaptchaMigration/composer.json b/ReCaptchaMigration/composer.json index c3ca9e84..c5479034 100644 --- a/ReCaptchaMigration/composer.json +++ b/ReCaptchaMigration/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA config migration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-config": "*" }, diff --git a/ReCaptchaNewsletter/composer.json b/ReCaptchaNewsletter/composer.json index c2175098..13ae1f45 100644 --- a/ReCaptchaNewsletter/composer.json +++ b/ReCaptchaNewsletter/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaPaypal/composer.json b/ReCaptchaPaypal/composer.json index bc65ef05..5b3fc9a1 100644 --- a/ReCaptchaPaypal/composer.json +++ b/ReCaptchaPaypal/composer.json @@ -3,7 +3,7 @@ "description": "Google reCaptcha integration for Magento2 PayPal PayflowPro payment form", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*", "magento/module-re-captcha-validation-api": "*", diff --git a/ReCaptchaReview/composer.json b/ReCaptchaReview/composer.json index 6d82fc8a..ca82a738 100644 --- a/ReCaptchaReview/composer.json +++ b/ReCaptchaReview/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaSendFriend/composer.json b/ReCaptchaSendFriend/composer.json index d23ce36c..e3f4c939 100644 --- a/ReCaptchaSendFriend/composer.json +++ b/ReCaptchaSendFriend/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaUi/composer.json b/ReCaptchaUi/composer.json index 1f7c1b4c..f5875016 100644 --- a/ReCaptchaUi/composer.json +++ b/ReCaptchaUi/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-validation-api": "*" }, diff --git a/ReCaptchaUser/composer.json b/ReCaptchaUser/composer.json index fe4f2420..240c4e45 100644 --- a/ReCaptchaUser/composer.json +++ b/ReCaptchaUser/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*", "magento/module-re-captcha-validation-api": "*" diff --git a/ReCaptchaValidation/composer.json b/ReCaptchaValidation/composer.json index 8f246669..add8d23c 100644 --- a/ReCaptchaValidation/composer.json +++ b/ReCaptchaValidation/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-validation-api": "*", "google/recaptcha": "^1.2" diff --git a/ReCaptchaValidationApi/composer.json b/ReCaptchaValidationApi/composer.json index 872e374c..2c28c1a8 100644 --- a/ReCaptchaValidationApi/composer.json +++ b/ReCaptchaValidationApi/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*" }, "type": "magento2-module", diff --git a/ReCaptchaVersion2Checkbox/composer.json b/ReCaptchaVersion2Checkbox/composer.json index 6b723625..f99e0a2c 100644 --- a/ReCaptchaVersion2Checkbox/composer.json +++ b/ReCaptchaVersion2Checkbox/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaVersion2Invisible/composer.json b/ReCaptchaVersion2Invisible/composer.json index 6ec110ee..b66fcaef 100644 --- a/ReCaptchaVersion2Invisible/composer.json +++ b/ReCaptchaVersion2Invisible/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaVersion3Invisible/composer.json b/ReCaptchaVersion3Invisible/composer.json index 70b95740..c3163bdf 100644 --- a/ReCaptchaVersion3Invisible/composer.json +++ b/ReCaptchaVersion3Invisible/composer.json @@ -3,7 +3,7 @@ "description": "Google reCAPTCHA integration for Magento2", "version": "1.0.0", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/Securitytxt/composer.json b/Securitytxt/composer.json index bca93c04..4cb41c9a 100644 --- a/Securitytxt/composer.json +++ b/Securitytxt/composer.json @@ -4,7 +4,7 @@ "version": "1.0.0", "type": "magento2-module", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-config": "*", "magento/module-store": "*" From 46e4fc3418cbd469912c3810a5065c67b9e7407a Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 7 May 2020 12:27:39 -0500 Subject: [PATCH 09/19] Revert "Set 1.0.0 version for packaging" --- ReCaptchaAdminUi/composer.json | 3 +- ReCaptchaCheckout/composer.json | 3 +- ReCaptchaContact/composer.json | 3 +- ReCaptchaCustomer/composer.json | 3 +- ReCaptchaFrontendUi/composer.json | 3 +- ReCaptchaMigration/composer.json | 3 +- ReCaptchaNewsletter/composer.json | 3 +- ReCaptchaPaypal/composer.json | 3 +- ReCaptchaReview/composer.json | 3 +- ReCaptchaSendFriend/composer.json | 3 +- ReCaptchaUi/composer.json | 3 +- ReCaptchaUser/composer.json | 3 +- ReCaptchaValidation/composer.json | 3 +- ReCaptchaValidationApi/composer.json | 3 +- ReCaptchaVersion2Checkbox/composer.json | 3 +- ReCaptchaVersion2Invisible/composer.json | 3 +- ReCaptchaVersion3Invisible/composer.json | 3 +- Securitytxt/composer.json | 3 +- _metapackage/composer.json | 37 ++++++++++++------------ 19 files changed, 36 insertions(+), 55 deletions(-) diff --git a/ReCaptchaAdminUi/composer.json b/ReCaptchaAdminUi/composer.json index 9060968f..005a9b9a 100644 --- a/ReCaptchaAdminUi/composer.json +++ b/ReCaptchaAdminUi/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-admin-ui", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaCheckout/composer.json b/ReCaptchaCheckout/composer.json index 352d4be8..33c10ffc 100644 --- a/ReCaptchaCheckout/composer.json +++ b/ReCaptchaCheckout/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-checkout", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-checkout": "*", "magento/module-re-captcha-ui": "*" diff --git a/ReCaptchaContact/composer.json b/ReCaptchaContact/composer.json index 7a99a61f..1e25f817 100644 --- a/ReCaptchaContact/composer.json +++ b/ReCaptchaContact/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-contact", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaCustomer/composer.json b/ReCaptchaCustomer/composer.json index 63f07f6e..c7df22e4 100644 --- a/ReCaptchaCustomer/composer.json +++ b/ReCaptchaCustomer/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-customer", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-customer": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaFrontendUi/composer.json b/ReCaptchaFrontendUi/composer.json index f7b5abe4..102a88c2 100644 --- a/ReCaptchaFrontendUi/composer.json +++ b/ReCaptchaFrontendUi/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-frontend-ui", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*" diff --git a/ReCaptchaMigration/composer.json b/ReCaptchaMigration/composer.json index c5479034..40b3277a 100644 --- a/ReCaptchaMigration/composer.json +++ b/ReCaptchaMigration/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-migration", "description": "Google reCAPTCHA config migration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-config": "*" }, diff --git a/ReCaptchaNewsletter/composer.json b/ReCaptchaNewsletter/composer.json index 13ae1f45..c70c2f0a 100644 --- a/ReCaptchaNewsletter/composer.json +++ b/ReCaptchaNewsletter/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-newsletter", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaPaypal/composer.json b/ReCaptchaPaypal/composer.json index 5b3fc9a1..4429c6ed 100644 --- a/ReCaptchaPaypal/composer.json +++ b/ReCaptchaPaypal/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-paypal", "description": "Google reCaptcha integration for Magento2 PayPal PayflowPro payment form", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*", "magento/module-re-captcha-validation-api": "*", diff --git a/ReCaptchaReview/composer.json b/ReCaptchaReview/composer.json index ca82a738..73d8795c 100644 --- a/ReCaptchaReview/composer.json +++ b/ReCaptchaReview/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-review", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaSendFriend/composer.json b/ReCaptchaSendFriend/composer.json index e3f4c939..68f59315 100644 --- a/ReCaptchaSendFriend/composer.json +++ b/ReCaptchaSendFriend/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-send-friend", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaUi/composer.json b/ReCaptchaUi/composer.json index f5875016..3ad26a8c 100644 --- a/ReCaptchaUi/composer.json +++ b/ReCaptchaUi/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-ui", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-validation-api": "*" }, diff --git a/ReCaptchaUser/composer.json b/ReCaptchaUser/composer.json index 240c4e45..8dfff32b 100644 --- a/ReCaptchaUser/composer.json +++ b/ReCaptchaUser/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-user", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*", "magento/module-re-captcha-validation-api": "*" diff --git a/ReCaptchaValidation/composer.json b/ReCaptchaValidation/composer.json index add8d23c..3a76b6c9 100644 --- a/ReCaptchaValidation/composer.json +++ b/ReCaptchaValidation/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-validation", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-re-captcha-validation-api": "*", "google/recaptcha": "^1.2" diff --git a/ReCaptchaValidationApi/composer.json b/ReCaptchaValidationApi/composer.json index 2c28c1a8..c06f316c 100644 --- a/ReCaptchaValidationApi/composer.json +++ b/ReCaptchaValidationApi/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-validation-api", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*" }, "type": "magento2-module", diff --git a/ReCaptchaVersion2Checkbox/composer.json b/ReCaptchaVersion2Checkbox/composer.json index f99e0a2c..8acd468d 100644 --- a/ReCaptchaVersion2Checkbox/composer.json +++ b/ReCaptchaVersion2Checkbox/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-version-2-checkbox", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaVersion2Invisible/composer.json b/ReCaptchaVersion2Invisible/composer.json index b66fcaef..5f95f3b5 100644 --- a/ReCaptchaVersion2Invisible/composer.json +++ b/ReCaptchaVersion2Invisible/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-version-2-invisible", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaVersion3Invisible/composer.json b/ReCaptchaVersion3Invisible/composer.json index c3163bdf..3a39ea00 100644 --- a/ReCaptchaVersion3Invisible/composer.json +++ b/ReCaptchaVersion3Invisible/composer.json @@ -1,9 +1,8 @@ { "name": "magento/module-re-captcha-version-3-invisible", "description": "Google reCAPTCHA integration for Magento2", - "version": "1.0.0", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/Securitytxt/composer.json b/Securitytxt/composer.json index 4cb41c9a..4a22e423 100644 --- a/Securitytxt/composer.json +++ b/Securitytxt/composer.json @@ -1,10 +1,9 @@ { "name": "magento/module-securitytxt", "description": "Security.txt file for Magento 2 websites", - "version": "1.0.0", "type": "magento2-module", "require": { - "php": "~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0", "magento/framework": "*", "magento/module-config": "*", "magento/module-store": "*" diff --git a/_metapackage/composer.json b/_metapackage/composer.json index 7d7d6cf4..c169aafd 100644 --- a/_metapackage/composer.json +++ b/_metapackage/composer.json @@ -1,27 +1,26 @@ { "name": "magento/security-package", "description": "Magento Security Package", - "version": "1.0.0", "type": "metapackage", "require": { - "magento/module-re-captcha-admin-ui": "1.0.0", - "magento/module-re-captcha-checkout": "1.0.0", - "magento/module-re-captcha-contact": "1.0.0", - "magento/module-re-captcha-customer": "1.0.0", - "magento/module-re-captcha-frontend-ui": "1.0.0", - "magento/module-re-captcha-migration": "1.0.0", - "magento/module-re-captcha-newsletter": "1.0.0", - "magento/module-re-captcha-paypal": "1.0.0", - "magento/module-re-captcha-review": "1.0.0", - "magento/module-re-captcha-send-friend": "1.0.0", - "magento/module-re-captcha-ui": "1.0.0", - "magento/module-re-captcha-user": "1.0.0", - "magento/module-re-captcha-validation": "1.0.0", - "magento/module-re-captcha-validation-api": "1.0.0", - "magento/module-re-captcha-version-2-checkbox": "1.0.0", - "magento/module-re-captcha-version-2-invisible": "1.0.0", - "magento/module-re-captcha-version-3-invisible": "1.0.0", - "magento/module-securitytxt": "1.0.0", + "magento/module-re-captcha-admin-ui": "*", + "magento/module-re-captcha-checkout": "*", + "magento/module-re-captcha-contact": "*", + "magento/module-re-captcha-customer": "*", + "magento/module-re-captcha-frontend-ui": "*", + "magento/module-re-captcha-migration": "*", + "magento/module-re-captcha-newsletter": "*", + "magento/module-re-captcha-paypal": "*", + "magento/module-re-captcha-review": "*", + "magento/module-re-captcha-send-friend": "*", + "magento/module-re-captcha-ui": "*", + "magento/module-re-captcha-user": "*", + "magento/module-re-captcha-validation": "*", + "magento/module-re-captcha-validation-api": "*", + "magento/module-re-captcha-version-2-checkbox": "*", + "magento/module-re-captcha-version-2-invisible": "*", + "magento/module-re-captcha-version-3-invisible": "*", + "magento/module-securitytxt": "*", "google/recaptcha": "^1.2" } } From dddb7ed988f72d486dcb60de2b01bb245be2ae02 Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 7 May 2020 12:41:05 -0500 Subject: [PATCH 10/19] magento/security-package#206: PHP 7.4 support --- ReCaptchaAdminUi/composer.json | 2 +- ReCaptchaCheckout/composer.json | 2 +- ReCaptchaContact/composer.json | 2 +- ReCaptchaCustomer/composer.json | 2 +- ReCaptchaFrontendUi/composer.json | 2 +- ReCaptchaMigration/composer.json | 2 +- ReCaptchaNewsletter/composer.json | 2 +- ReCaptchaPaypal/composer.json | 2 +- ReCaptchaReview/composer.json | 2 +- ReCaptchaSendFriend/composer.json | 2 +- ReCaptchaUi/composer.json | 2 +- ReCaptchaUser/composer.json | 2 +- ReCaptchaValidation/composer.json | 2 +- ReCaptchaValidationApi/composer.json | 2 +- ReCaptchaVersion2Checkbox/composer.json | 2 +- ReCaptchaVersion2Invisible/composer.json | 2 +- ReCaptchaVersion3Invisible/composer.json | 2 +- Securitytxt/composer.json | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ReCaptchaAdminUi/composer.json b/ReCaptchaAdminUi/composer.json index 005a9b9a..7e089c0b 100644 --- a/ReCaptchaAdminUi/composer.json +++ b/ReCaptchaAdminUi/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-admin-ui", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaCheckout/composer.json b/ReCaptchaCheckout/composer.json index 33c10ffc..1b394307 100644 --- a/ReCaptchaCheckout/composer.json +++ b/ReCaptchaCheckout/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-checkout", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-checkout": "*", "magento/module-re-captcha-ui": "*" diff --git a/ReCaptchaContact/composer.json b/ReCaptchaContact/composer.json index 1e25f817..0abcf099 100644 --- a/ReCaptchaContact/composer.json +++ b/ReCaptchaContact/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-contact", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaCustomer/composer.json b/ReCaptchaCustomer/composer.json index c7df22e4..c189e6e3 100644 --- a/ReCaptchaCustomer/composer.json +++ b/ReCaptchaCustomer/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-customer", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-customer": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaFrontendUi/composer.json b/ReCaptchaFrontendUi/composer.json index 102a88c2..32c73d88 100644 --- a/ReCaptchaFrontendUi/composer.json +++ b/ReCaptchaFrontendUi/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-frontend-ui", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*" diff --git a/ReCaptchaMigration/composer.json b/ReCaptchaMigration/composer.json index 40b3277a..9c122161 100644 --- a/ReCaptchaMigration/composer.json +++ b/ReCaptchaMigration/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-migration", "description": "Google reCAPTCHA config migration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-config": "*" }, diff --git a/ReCaptchaNewsletter/composer.json b/ReCaptchaNewsletter/composer.json index c70c2f0a..108ad049 100644 --- a/ReCaptchaNewsletter/composer.json +++ b/ReCaptchaNewsletter/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-newsletter", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaPaypal/composer.json b/ReCaptchaPaypal/composer.json index 4429c6ed..640a2b93 100644 --- a/ReCaptchaPaypal/composer.json +++ b/ReCaptchaPaypal/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-paypal", "description": "Google reCaptcha integration for Magento2 PayPal PayflowPro payment form", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*", "magento/module-re-captcha-validation-api": "*", diff --git a/ReCaptchaReview/composer.json b/ReCaptchaReview/composer.json index 73d8795c..be9bc922 100644 --- a/ReCaptchaReview/composer.json +++ b/ReCaptchaReview/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-review", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaSendFriend/composer.json b/ReCaptchaSendFriend/composer.json index 68f59315..fa7a0eb4 100644 --- a/ReCaptchaSendFriend/composer.json +++ b/ReCaptchaSendFriend/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-send-friend", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*" }, diff --git a/ReCaptchaUi/composer.json b/ReCaptchaUi/composer.json index 3ad26a8c..2f0e4b81 100644 --- a/ReCaptchaUi/composer.json +++ b/ReCaptchaUi/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-ui", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-validation-api": "*" }, diff --git a/ReCaptchaUser/composer.json b/ReCaptchaUser/composer.json index 8dfff32b..4225a716 100644 --- a/ReCaptchaUser/composer.json +++ b/ReCaptchaUser/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-user", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-ui": "*", "magento/module-re-captcha-validation-api": "*" diff --git a/ReCaptchaValidation/composer.json b/ReCaptchaValidation/composer.json index 3a76b6c9..27557ec4 100644 --- a/ReCaptchaValidation/composer.json +++ b/ReCaptchaValidation/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-validation", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-re-captcha-validation-api": "*", "google/recaptcha": "^1.2" diff --git a/ReCaptchaValidationApi/composer.json b/ReCaptchaValidationApi/composer.json index c06f316c..137541b4 100644 --- a/ReCaptchaValidationApi/composer.json +++ b/ReCaptchaValidationApi/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-validation-api", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*" }, "type": "magento2-module", diff --git a/ReCaptchaVersion2Checkbox/composer.json b/ReCaptchaVersion2Checkbox/composer.json index 8acd468d..a565558c 100644 --- a/ReCaptchaVersion2Checkbox/composer.json +++ b/ReCaptchaVersion2Checkbox/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-version-2-checkbox", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaVersion2Invisible/composer.json b/ReCaptchaVersion2Invisible/composer.json index 5f95f3b5..b3089652 100644 --- a/ReCaptchaVersion2Invisible/composer.json +++ b/ReCaptchaVersion2Invisible/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-version-2-invisible", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/ReCaptchaVersion3Invisible/composer.json b/ReCaptchaVersion3Invisible/composer.json index 3a39ea00..204d10fd 100644 --- a/ReCaptchaVersion3Invisible/composer.json +++ b/ReCaptchaVersion3Invisible/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-re-captcha-version-3-invisible", "description": "Google reCAPTCHA integration for Magento2", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-store": "*", "magento/module-re-captcha-ui": "*", diff --git a/Securitytxt/composer.json b/Securitytxt/composer.json index 4a22e423..a0761449 100644 --- a/Securitytxt/composer.json +++ b/Securitytxt/composer.json @@ -3,7 +3,7 @@ "description": "Security.txt file for Magento 2 websites", "type": "magento2-module", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0", + "php": "~7.3.0||~7.4.0", "magento/framework": "*", "magento/module-config": "*", "magento/module-store": "*" From ed6acec5de71abe5c14ee900583de7af1e14000b Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 7 May 2020 16:31:26 -0500 Subject: [PATCH 11/19] magento/security-package#206: PHP 7.4 support - integration test fix --- ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php b/ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php index 3eef2a76..448622ca 100644 --- a/ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php +++ b/ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php @@ -54,7 +54,7 @@ class NewsletterFormTest extends AbstractController /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->mutableScopeConfig = $this->_objectManager->get(MutableScopeConfig::class); From a5189cab4b88b7a6f6598ac08082aee197b77652 Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 7 May 2020 17:37:43 -0500 Subject: [PATCH 12/19] magento/security-package#206: PHP 7.4 support - integration test fixes --- ReCaptchaContact/Test/Integration/ContactFormTest.php | 6 +++--- ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php | 4 ++-- .../Test/Integration/CreateCustomerFormTest.php | 4 ++-- .../Test/Integration/ForgotPasswordFormTest.php | 4 ++-- ReCaptchaCustomer/Test/Integration/LoginFromTest.php | 4 ++-- ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php | 6 +++--- ReCaptchaReview/Test/Integration/ReviewFormTest.php | 6 +++--- ReCaptchaSendFriend/Test/Integration/SendFriendFormTest.php | 6 +++--- ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php | 4 ++-- ReCaptchaUser/Test/Integration/LoginFormTest.php | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ReCaptchaContact/Test/Integration/ContactFormTest.php b/ReCaptchaContact/Test/Integration/ContactFormTest.php index ffa6b2fc..9e963fc8 100644 --- a/ReCaptchaContact/Test/Integration/ContactFormTest.php +++ b/ReCaptchaContact/Test/Integration/ContactFormTest.php @@ -178,8 +178,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? self::assertContains('field-recaptcha', $content) - : self::assertNotContains('field-recaptcha', $content); + ? self::assertStringContainsString('field-recaptcha', $content) + : self::assertStringNotContainsString('field-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } @@ -193,7 +193,7 @@ private function checkSuccessfulPostResponse(array $postValues = []): void $this->makePostRequest($postValues); $this->assertSessionMessages( - self::contains( + self::containsEqual( "Thanks for contacting us with your comments and questions. We'll respond to you very soon." ), MessageInterface::TYPE_SUCCESS diff --git a/ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php b/ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php index 79e97200..9cacdacd 100644 --- a/ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php +++ b/ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php @@ -188,8 +188,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? $this->assertContains('recaptcha-popup-login', $content) - : $this->assertNotContains('recaptcha-popup-login', $content); + ? $this->assertStringContainsString('recaptcha-popup-login', $content) + : $this->assertStringNotContainsString('recaptcha-popup-login', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } diff --git a/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php b/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php index 3155ca6e..ec24114c 100644 --- a/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php +++ b/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php @@ -201,8 +201,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? $this->assertContains('field-recaptcha', $content) - : $this->assertNotContains('field-recaptcha', $content); + ? $this->assertStringContainsString('field-recaptcha', $content) + : $this->assertStringNotContainsString('field-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } diff --git a/ReCaptchaCustomer/Test/Integration/ForgotPasswordFormTest.php b/ReCaptchaCustomer/Test/Integration/ForgotPasswordFormTest.php index 55d40b15..59265f51 100644 --- a/ReCaptchaCustomer/Test/Integration/ForgotPasswordFormTest.php +++ b/ReCaptchaCustomer/Test/Integration/ForgotPasswordFormTest.php @@ -195,8 +195,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? $this->assertContains('field-recaptcha', $content) - : $this->assertNotContains('field-recaptcha', $content); + ? $this->assertStringContainsString('field-recaptcha', $content) + : $this->assertStringNotContainsString('field-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } diff --git a/ReCaptchaCustomer/Test/Integration/LoginFromTest.php b/ReCaptchaCustomer/Test/Integration/LoginFromTest.php index 5f31ed30..e5a61344 100644 --- a/ReCaptchaCustomer/Test/Integration/LoginFromTest.php +++ b/ReCaptchaCustomer/Test/Integration/LoginFromTest.php @@ -195,8 +195,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? $this->assertContains('field-recaptcha', $content) - : $this->assertNotContains('field-recaptcha', $content); + ? $this->assertStringContainsString('field-recaptcha', $content) + : $this->assertStringNotContainsString('field-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } diff --git a/ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php b/ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php index 448622ca..ad496c47 100644 --- a/ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php +++ b/ReCaptchaNewsletter/Test/Integration/NewsletterFormTest.php @@ -192,8 +192,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? self::assertContains('field-recaptcha', $content) - : self::assertNotContains('field-recaptcha', $content); + ? self::assertStringContainsString('field-recaptcha', $content) + : self::assertStringNotContainsString('field-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } @@ -207,7 +207,7 @@ private function checkSuccessfulPostResponse(array $postValues = []): void $this->makePostRequest($postValues); $this->assertSessionMessages( - self::contains( + self::containsEqual( 'Thank you for your subscription.' ), MessageInterface::TYPE_SUCCESS diff --git a/ReCaptchaReview/Test/Integration/ReviewFormTest.php b/ReCaptchaReview/Test/Integration/ReviewFormTest.php index 0eb4c2a1..a7cbe8e3 100644 --- a/ReCaptchaReview/Test/Integration/ReviewFormTest.php +++ b/ReCaptchaReview/Test/Integration/ReviewFormTest.php @@ -188,8 +188,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? self::assertContains('field-recaptcha', $content) - : self::assertNotContains('field-recaptcha', $content); + ? self::assertStringContainsString('field-recaptcha', $content) + : self::assertStringNotContainsString('field-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } @@ -203,7 +203,7 @@ private function checkSuccessfulPostResponse(array $postValues = []): void $this->makePostRequest($postValues); $this->assertSessionMessages( - self::contains( + self::containsEqual( 'You submitted your review for moderation.' ), MessageInterface::TYPE_SUCCESS diff --git a/ReCaptchaSendFriend/Test/Integration/SendFriendFormTest.php b/ReCaptchaSendFriend/Test/Integration/SendFriendFormTest.php index adab3eab..e87f9faf 100644 --- a/ReCaptchaSendFriend/Test/Integration/SendFriendFormTest.php +++ b/ReCaptchaSendFriend/Test/Integration/SendFriendFormTest.php @@ -211,8 +211,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? self::assertContains('field-recaptcha', $content) - : self::assertNotContains('field-recaptcha', $content); + ? self::assertStringContainsString('field-recaptcha', $content) + : self::assertStringNotContainsString('field-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } @@ -226,7 +226,7 @@ private function checkSuccessfulPostResponse(array $postValues = []): void $this->makePostRequest($postValues); $this->assertSessionMessages( - self::contains( + self::containsEqual( 'The link to a friend was sent.' ), MessageInterface::TYPE_SUCCESS diff --git a/ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php b/ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php index d7af7752..3ae29679 100644 --- a/ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php +++ b/ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php @@ -172,8 +172,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? $this->assertContains('admin-recaptcha', $content) - : $this->assertNotContains('admin-recaptcha', $content); + ? $this->assertStringContainsString('admin-recaptcha', $content) + : $this->assertStringNotContainsString('admin-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } diff --git a/ReCaptchaUser/Test/Integration/LoginFormTest.php b/ReCaptchaUser/Test/Integration/LoginFormTest.php index bc136d96..8595c861 100644 --- a/ReCaptchaUser/Test/Integration/LoginFormTest.php +++ b/ReCaptchaUser/Test/Integration/LoginFormTest.php @@ -184,8 +184,8 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo self::assertNotEmpty($content); $shouldContainReCaptcha - ? $this->assertContains('admin-recaptcha', $content) - : $this->assertNotContains('admin-recaptcha', $content); + ? $this->assertStringContainsString('admin-recaptcha', $content) + : $this->assertStringNotContainsString('admin-recaptcha', $content); self::assertEmpty($this->getSessionMessages(MessageInterface::TYPE_ERROR)); } From 373c7ab110a04bbed42ef9d5a26d7e6f270a98ad Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Fri, 8 May 2020 11:04:51 -0500 Subject: [PATCH 13/19] magento/security-package#206: PHP 7.4 support --- ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php | 2 +- ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php b/ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php index 9cacdacd..7a65d351 100644 --- a/ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php +++ b/ReCaptchaCustomer/Test/Integration/AjaxLoginFormTest.php @@ -18,7 +18,7 @@ use Magento\TestFramework\App\MutableScopeConfig; use Magento\TestFramework\TestCase\AbstractController; use PHPUnit\Framework\MockObject\MockObject; -use Zend\Http\Headers; +use Laminas\Http\Headers; /** * @magentoDataFixture Magento/Customer/_files/customer.php diff --git a/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php b/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php index ec24114c..d453cd16 100644 --- a/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php +++ b/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php @@ -25,6 +25,7 @@ /** * @magentoAppArea frontend * @magentoAppIsolation enabled + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CreateCustomerFormTest extends AbstractController { From d95f093593a625a7bc467af4f924e3b6d5100a0a Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 21 May 2020 13:41:15 -0500 Subject: [PATCH 14/19] magento/security-package#127: Configuration cannot be saved in scope that is different from Default Config --- .../Model/Config/Backend/SecureUrl.php | 36 +++++ Securitytxt/Model/Config/Backend/Validate.php | 126 ------------------ Securitytxt/etc/adminhtml/system.xml | 42 +++--- 3 files changed, 62 insertions(+), 142 deletions(-) create mode 100644 Securitytxt/Model/Config/Backend/SecureUrl.php delete mode 100644 Securitytxt/Model/Config/Backend/Validate.php diff --git a/Securitytxt/Model/Config/Backend/SecureUrl.php b/Securitytxt/Model/Config/Backend/SecureUrl.php new file mode 100644 index 00000000..50e6bd71 --- /dev/null +++ b/Securitytxt/Model/Config/Backend/SecureUrl.php @@ -0,0 +1,36 @@ +getValue(); + // phpcs:ignore Magento2.Functions.DiscouragedFunction + $isValid = parse_url($url, PHP_URL_SCHEME) === 'https'; + if (!$isValid && $url !== '') { + throw new ValidatorException( + __('URL should be in correct format and must start with HTTPS.') + ); + } + return $this; + } +} diff --git a/Securitytxt/Model/Config/Backend/Validate.php b/Securitytxt/Model/Config/Backend/Validate.php deleted file mode 100644 index 30e78bcf..00000000 --- a/Securitytxt/Model/Config/Backend/Validate.php +++ /dev/null @@ -1,126 +0,0 @@ -getPath()); - $sectionName = reset($sectionPathString); - - if ($sectionName !== Config::XML_SECURITYTXT_MODULE || $this->getData('group_id') !== 'contact_information') { - return parent::validateBeforeSave(); - } - - $dataGroup = $this->getData()['groups']; - $contactInformationFields = $dataGroup['contact_information']['fields']; - $otherInformationFields = $dataGroup['other_information']['fields']; - $isExtensionEnabled = (bool)$dataGroup['general']['fields']['enabled']['value']; - $contactEmail = $contactInformationFields['email']['value']; - $contactPhone = $contactInformationFields['phone']['value']; - $contactWebPage = $contactInformationFields['contact_page']['value']; - - if ($isExtensionEnabled) { - if ($contactEmail === '' && $contactPhone === '' && $contactWebPage === '') { - throw new ValidatorException(__('At least one contact information is required.')); - } - } else { - return parent::validateBeforeSave(); - } - - $this->validateContactEmail($contactEmail); - $this->validateContactWebpageUrl($contactWebPage); - $this->validateUrlField("Contact Page URL", $contactWebPage); - $this->validateUrlField("Encryption URL", $otherInformationFields['encryption']['value']); - $this->validateUrlField("Acknowledgements URL", $otherInformationFields['acknowledgements']['value']); - $this->validateUrlField("Hiring URL", $otherInformationFields['hiring']['value']); - $this->validateUrlField("Policy URL", $otherInformationFields['policy']['value']); - - return parent::validateBeforeSave(); - } - - /** - * Validate url value to be secure. - * - * @param string $url - * @return bool - */ - private function validateSecureUrl(string $url): bool - { - $url = filter_var($url, FILTER_SANITIZE_STRING); - // phpcs:ignore Magento2.Functions.DiscouragedFunction - if (parse_url($url, PHP_URL_SCHEME) === 'https' && filter_var($url, FILTER_VALIDATE_URL)) { - return true; - } - - return false; - } - - /** - * Validate contact email configuration field. - * - * @param string $contactEmail - * @return void - * @throws ValidatorException - */ - private function validateContactEmail(string $contactEmail): void - { - if ($contactEmail !== '' && !filter_var($contactEmail, FILTER_VALIDATE_EMAIL)) { - throw new ValidatorException( - __('Contact Information: Email validation failed. Please enter in correct format.') - ); - } - } - - /** - * Validate contact web page configuration field. - * - * @param string $contactWebpage - * @return void - * @throws ValidatorException - */ - private function validateContactWebpageUrl(string $contactWebpage): void - { - if ($contactWebpage !== '' && !$this->validateSecureUrl($contactWebpage)) { - throw new ValidatorException( - __('Contact Information: Contact Page URL should be in correct format and must start with HTTPS.') - ); - } - } - - /** - * Validate Security.txt configuration field containing url. - * - * @param string $fieldName - * @param string $fieldValue - * @throws ValidatorException - */ - private function validateUrlField(string $fieldName, string $fieldValue): void - { - if ($fieldValue !== '' && !$this->validateSecureUrl($fieldValue)) { - throw new ValidatorException( - __('Other Information: %1 should be in correct format and must start with HTTPS.', $fieldName) - ); - } - } -} diff --git a/Securitytxt/etc/adminhtml/system.xml b/Securitytxt/etc/adminhtml/system.xml index c636be88..2ccb332a 100644 --- a/Securitytxt/etc/adminhtml/system.xml +++ b/Securitytxt/etc/adminhtml/system.xml @@ -12,82 +12,92 @@
+ showInWebsite="1" showInStore="0"> separator-top security Magento_Securitytxt::config + showInStore="0"> + showInStore="0"> Magento\Config\Model\Config\Source\Yesno + showInStore="0"> + showInWebsite="1" showInStore="0"> validate-email - Magento\Securitytxt\Model\Config\Backend\Validate + showInWebsite="1" showInStore="0"> + showInWebsite="1" showInStore="0"> validate-url validate-no-html-tags + Magento\Securitytxt\Model\Config\Backend\SecureUrl Example: https://example.com/security-contact.html + + 1 + + showInStore="0"> + showInWebsite="1" showInStore="0" > validate-url validate-no-html-tags Example: https://example.com/pgp-key.txt + Magento\Securitytxt\Model\Config\Backend\SecureUrl + showInWebsite="1" showInStore="0"> validate-url validate-no-html-tags Example: https://example.com/hall-of-fame.html + Magento\Securitytxt\Model\Config\Backend\SecureUrl + showInWebsite="1" showInStore="0"> validate-text validate-no-html-tags Example: en, es, hi, de, fr + showInWebsite="1" showInStore="0"> validate-url validate-no-html-tags Example: https://example.com/jobs.html + Magento\Securitytxt\Model\Config\Backend\SecureUrl + showInWebsite="1" showInStore="0"> validate-url validate-no-html-tags Example: https://example.com/security-policy.html + Magento\Securitytxt\Model\Config\Backend\SecureUrl + showInWebsite="1" showInStore="0"> validate-no-html-tags + + 1 +
- \ No newline at end of file + From ff99e0a9185ec5809ef71ab3feab085b0fbad90d Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 21 May 2020 14:32:47 -0500 Subject: [PATCH 15/19] magento/security-package#140: Link "Read instructions on how to generate signature" in Store-Configuration is incorrect. --- Securitytxt/Model/Config/Signature.php | 21 +++++++++++++++++---- Securitytxt/i18n/en_US.csv | 3 ++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Securitytxt/Model/Config/Signature.php b/Securitytxt/Model/Config/Signature.php index 59a740c1..a9d62d31 100644 --- a/Securitytxt/Model/Config/Signature.php +++ b/Securitytxt/Model/Config/Signature.php @@ -3,12 +3,12 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - declare(strict_types=1); namespace Magento\Securitytxt\Model\Config; use Magento\Config\Model\Config\CommentInterface; +use Magento\Framework\Escaper; /** * Signature field description @@ -21,11 +21,19 @@ class Signature implements CommentInterface private $instructionLink; /** + * @var Escaper + */ + private $escaper; + + /** + * @param Escaper $escaper * @param string $instructionLink */ public function __construct( + Escaper $escaper, string $instructionLink = '' ) { + $this->escaper = $escaper; $this->instructionLink = $instructionLink; } @@ -38,8 +46,13 @@ public function __construct( */ public function getCommentText($elementValue): string { - return " - Read instructions on how to generate signature - "; + if ($this->instructionLink === '') { + return ''; + } + return sprintf( + "%s", + $this->escaper->escapeUrl($this->instructionLink), + __('Read instructions on how to generate signature') + ); } } diff --git a/Securitytxt/i18n/en_US.csv b/Securitytxt/i18n/en_US.csv index e3062d2c..76a5870b 100644 --- a/Securitytxt/i18n/en_US.csv +++ b/Securitytxt/i18n/en_US.csv @@ -26,4 +26,5 @@ Hiring,Hiring "Example: https://example.com/jobs.html","Example: https://example.com/jobs.html" Policy,Policy "Example: https://example.com/security-policy.html","Example: https://example.com/security-policy.html" -Signature,Signature \ No newline at end of file +Signature,Signature +"Read instructions on how to generate signature","Read instructions on how to generate signature" From e5006852438bd52b6167933e0b3c7a6d6bbd66d0 Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 21 May 2020 15:13:10 -0500 Subject: [PATCH 16/19] magento/security-package#188: Need to add notification message that reCAPCTHA type should be configured before enabling it --- ReCaptchaAdminUi/etc/adminhtml/system.xml | 8 ++++++++ ReCaptchaCustomer/etc/adminhtml/system.xml | 4 ---- ReCaptchaUser/etc/adminhtml/system.xml | 4 ---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ReCaptchaAdminUi/etc/adminhtml/system.xml b/ReCaptchaAdminUi/etc/adminhtml/system.xml index 5666470f..f3cfdea0 100644 --- a/ReCaptchaAdminUi/etc/adminhtml/system.xml +++ b/ReCaptchaAdminUi/etc/adminhtml/system.xml @@ -22,6 +22,10 @@ + + Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice +
@@ -35,6 +39,10 @@ + + Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice +
diff --git a/ReCaptchaCustomer/etc/adminhtml/system.xml b/ReCaptchaCustomer/etc/adminhtml/system.xml index d68a9045..a9ed7e6d 100644 --- a/ReCaptchaCustomer/etc/adminhtml/system.xml +++ b/ReCaptchaCustomer/etc/adminhtml/system.xml @@ -10,10 +10,6 @@
- - Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice - diff --git a/ReCaptchaUser/etc/adminhtml/system.xml b/ReCaptchaUser/etc/adminhtml/system.xml index 88560fff..8bb4d234 100644 --- a/ReCaptchaUser/etc/adminhtml/system.xml +++ b/ReCaptchaUser/etc/adminhtml/system.xml @@ -10,10 +10,6 @@
- - Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice - From 1f582793296dd2a9bdb9a6ed9f35034ce31934f5 Mon Sep 17 00:00:00 2001 From: Alexander Steshuk Date: Fri, 22 May 2020 14:41:42 +0300 Subject: [PATCH 17/19] Update for CSS. --- ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less b/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less index aea1cb28..d4623ef1 100644 --- a/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less +++ b/ReCaptchaAdminUi/view/adminhtml/web/css/source/_module.less @@ -2,7 +2,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -.recaptcha_frontend_type_for_recaptcha_backend_info_heading_notice, +.recaptcha_backend_type_for_recaptcha_backend_info_heading_notice, .recaptcha_frontend_type_for_recaptcha_frontend_info_heading_notice { strong { color: @grid-severity-critical-color; From db15184d44fcc2fb9f03b505b3e05b4765cbddfa Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Tue, 26 May 2020 12:45:14 -0500 Subject: [PATCH 18/19] 2fa static fix --- TwoFactorAuth/Model/AdminAccessTokenService.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/TwoFactorAuth/Model/AdminAccessTokenService.php b/TwoFactorAuth/Model/AdminAccessTokenService.php index bac1f3a0..3b4cf825 100644 --- a/TwoFactorAuth/Model/AdminAccessTokenService.php +++ b/TwoFactorAuth/Model/AdminAccessTokenService.php @@ -90,16 +90,16 @@ public function createAdminAccessToken($username, $password): string } if (!$this->configRequestManager->isConfigurationRequiredFor($userId)) { - // @codingStandardsIgnoreStart + // phpcs:ignore Magento2.Functions.DiscouragedFunction throw new LocalizedException( - __( + call_user_func( + '__', 'Please use the 2fa provider-specific endpoints to obtain a token.', [ 'active_providers' => $activeProviderCodes ] ) ); - // @codingStandardsIgnoreEnd } elseif (empty($this->tfa->getUserProviders($userId))) { // It is expected that available 2fa providers are selected via db or admin ui throw new LocalizedException( @@ -116,7 +116,9 @@ public function createAdminAccessToken($username, $password): string } throw new LocalizedException( - __( + // phpcs:ignore Magento2.Functions.DiscouragedFunction + call_user_func( + '__', 'You are required to configure personal Two-Factor Authorization in order to login. ' . 'Please check your email.', [ From b51a20ee48db0e3ecb83472dde0ae5f9f23453d8 Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Tue, 26 May 2020 13:26:25 -0500 Subject: [PATCH 19/19] Moved phpcs supression --- TwoFactorAuth/Model/AdminAccessTokenService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TwoFactorAuth/Model/AdminAccessTokenService.php b/TwoFactorAuth/Model/AdminAccessTokenService.php index 3b4cf825..007878a0 100644 --- a/TwoFactorAuth/Model/AdminAccessTokenService.php +++ b/TwoFactorAuth/Model/AdminAccessTokenService.php @@ -90,8 +90,8 @@ public function createAdminAccessToken($username, $password): string } if (!$this->configRequestManager->isConfigurationRequiredFor($userId)) { - // phpcs:ignore Magento2.Functions.DiscouragedFunction throw new LocalizedException( + // phpcs:ignore Magento2.Functions.DiscouragedFunction call_user_func( '__', 'Please use the 2fa provider-specific endpoints to obtain a token.',