magento2
magento2 copied to clipboard
Newsletter Subscription does not check for newsletter/general/active (no effective check for disabled newsletter implemented)
We found on our Magento2 Shops (Version 2.4.0 - 2.4.2) various successful attempts to subscribe to newsletter by posting to /newsletter/subscriber/new/. The newsletter functionality however is disabled, but still accepting new emails and sending confirmation mails out.
Preconditions (*)
- Magento installation version 2.4.0 to 2.4.2 is vulnerable
Steps to reproduce (*)
- In the admin backend, disable newsletter functionality.
- Create or forge html form that posts to /newsletter/subscriber/new/
Expected result (*)
- New subscribers should not be accepted
Actual result (*)
- In the backend, you will find a new newsletter subscriber. Furthermore, a newsletter confirmation email is sent out.
Since the Magento_Newsletter module can't be disabled due to dependencies from Magento_Customer, the only way to prevent new subscribers is to edit code in vendor/magento/module-newsletter/Controller/Subscriber/NewAction.php.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [X] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @stephansteiner. Thank you for your report. To help us process this issue please make sure that you provided the following information:
- Summary of the issue
- Information on your environment
- Steps to reproduce
- Expected and actual results
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me 2.4-develop instance
Hi @stephansteiner. Thank you for your request. I'm working on Magento instance for you.
Hi @stephansteiner, here is your Magento Instance: https://2bfdda75e315b500b123d2eca47506cd-2-4-develop.instances.magento-community.engineering Admin access: https://2bfdda75e315b500b123d2eca47506cd-2-4-develop.instances.magento-community.engineering/admin_a95b Login: f10e4045 Password: 3ad292f06ba1
Ok, I was able to recreate the bug on the test instance. To make it easy, I used the newsletter subscription form on the home page of the test instance. But you can inject any html form into the page or modify the search form.
The steps to recreate the bugs are:
- Open frontend, the newsletter subscription in the page bottom should be visible
- Open backend, disable the newsletter functionality (Stores > Configuration > Customers > Newsletter > General Options > Enabled -> set to "No", clear cache to make configuration change active
- Switch to the frontend (don't reload or the newsletter subscription form will disappear)
- Enter any email (i entered "[email protected]") click on "Subscribe"
- The message "Thank you for your subscription" appears, in the backend the email is subscribed.
If you already disabled the newsletter functionality and the form is not visible, you can inject any html into the page source code (just change the shop url before /newsletter/subscriber/new) :
<form action="https://2bfdda75e315b500b123d2eca47506cd-2-4-develop.instances.magento-community.engineering/newsletter/subscriber/new/" method="POST">
<input type="text" name="email" value="[email protected]" />
<input type="submit"/>
</form>
when submitting the form, you have another subscriber in the newsletter.
Hi @engcom-Golf. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself. -
[ ] 3. Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 5. Add label
Issue: Confirmed
once verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@stephansteiner Thanks for reporting the Bug. Issue is marked as Confirmed. One of our team member will start working on it.
@engcom-Golf Thank you for verifying the issue.
Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
- [ ] Add
"Reproduced on "
label(s) to this ticket based on verification result
Once all required information is added, please add label "Issue: Confirmed"
again.
Thanks!
@m2-community-project[bot] Thank you for verifying the issue.
Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
- [ ] Add
"Reproduced on "
label(s) to this ticket based on verification result
Once all required information is added, please add label "Issue: Confirmed"
again.
Thanks!
:white_check_mark: Confirmed by @engcom-Golf
Thank you for verifying the issue. Based on the provided information internal tickets MC-42371
were created
Issue Available: @engcom-Golf, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@magento I am working on this
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-10806 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.