Don't trigger expiration redirect on POST requests

Created on 23 November 2023, about 1 year ago
Updated 11 August 2024, 4 months ago

Problem/Motivation

If a user is editing content, cron runs and expires their password and then they hit save all work is lost. We can detect a POST request at the top of the event subscriber and return early on a POST

Steps to reproduce

Login and go to an Add content page
Update the users field_password_expiration_value to 1 and clear cache
Submit the form
Get redirected to the user edit screen with the error message about password expiry
Notice content is not created

Proposed resolution

    if ($this->request->getMethod() === 'POST') {
      return;
    }

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇦🇺Australia acbramley

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024