Fix usage of current request in the PasswordPolicyEventSubscriber

Created on 20 May 2023, over 1 year ago
Updated 8 April 2024, 9 months ago

Problem/Motivation

PasswordPolicyEventSubscriber currently injects the request stack to have access to the current request. It subscribes to the KernelEvents::REQUEST event. This event already has the request object.

The checkForUserPasswordExpiration method should retrieve the request from the event object with getRequest(.

If the concern is only running against the main request and no subrequests, the module isn't performing that check. This can also be done with the getRequestType method on the event object.

Steps to reproduce

Proposed resolution

Drop dependency of request stack. Refactor subscriber method to use event object's request and request type.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇺🇸United States mglaman WI, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024