Skip to content

Guest users can subscribe to a newsletter even if the module is disabled from the Magento admin panel #39757

@pullemall

Description

@pullemall

Preconditions and environment

  • Magento version 2.4.6

Steps to reproduce

  1. Disable the newsletter module in the Magento admin panel
  2. Send the AJAX POST request to the controller newsletter/subscriber/new with necessary data e.g.: email: test@test.test
  3. Check newsletter subscribers

Expected result

When the module is disabled a guest user is unable to subscribe to newsletters

Actual result

When the module is disabled a guest user can subscribe to newsletters

Additional information

The issue happens because the controller's method \Magento\Newsletter\Controller\Subscriber\NewAction::execute doesn't check if the module is enabled or disabled, but the default config allows guests to subscribe to newsletters:

Image

Request data:
Image

Image Image

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • 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”.

Metadata

Metadata

Assignees

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.4.6Indicates original Magento version for the Issue report.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions