Problem/Motivation

The https://git.drupalcode.org/project/mailing_list/-/commit/7ca34df2016bab2... commit broke setting of right email_confirmation_status property and creating Email Confirmation. The above leeds to unable to verify subscription by anonumous users.

Steps to reproduce

Install latest mailing_list_confirm module as usual, configure email confirmation and try to subscribe under anonymous

Proposed resolution

The getOwner() method returns every time an Drupal\user\Entity\User object, even for anonymous user.

We need to combine $entity->getOwner() and $entity->getOwner()->hasPermission() conditions, to prevent early return bypassing inside:
- mailing_list_confirm_mailing_list_subscription_presave
- mailing_list_confirm_mailing_list_subscription_update

Remaining tasks

Review and test changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vlad.dancer created an issue. See original summary.

vlad.dancer’s picture

Status: Active » Needs review
jlscott’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for picking up the error in the commit from #3303237 and providing a fix.

jlscott’s picture

Status: Reviewed & tested by the community » Fixed

Merged into 8.x-1.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.