Drupal version 7.79 or higher. PRLP version 7.x-1.4

Steps to reproduce

  1. Generate Reset password link and click on it
  2. When on the reset password page, submit the form by leaving the password fields blank or not matching passwords
  3. Submit the form again without making any changes
  4. The user is redirected to the Forgot password page

Correct behaviour

User should remain on the Forgot password page

CommentFileSizeAuthor
#2 incorrect-redirection-3223175-2.patch1.01 KBgianani

Issue fork prlp-3223175

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

gianani created an issue. See original summary.

gianani’s picture

The issue is probably due to this code which checks the $form_state['input'] value

if (isset($_SESSION['prlp_reset_hash']) && empty($form_state['input'])) {
        $_SESSION['pass_reset_hash'] = $_SESSION['prlp_reset_hash'];
      }

Adding a patch below

gianani’s picture

Issue summary: View changes

ArneoGthomas made their first commit to this issue’s fork.

ArneoGthomas’s picture

I had the same problem and the patch helps me.
I validate this patch.

thx

JordanMagnuson’s picture

Status: Active » Reviewed & tested by the community

Yeah, this is a major bug in the 7.x version of the module currently.

If the user gets a validation error during password reset, then submits the form successfully afterwards, they are not logged in, and are told that the "one time login link has already been used."

Leads to reset password loops and frustrated users.

Patch in #2 seems to do the trick and make things work as expected.

JordanMagnuson’s picture

Version: 7.x-1.4 » 7.x-1.x-dev