Password reset (at one-time login) leads to "client error"

Created on 3 February 2023, over 1 year ago
Updated 4 February 2023, over 1 year ago

Problem/Motivation

Tested on a fresh Drupal 10.0.2 installation. Following the one-time login link, entering passwords and clicking "Log in" leads to /user/reset/*/*/login page that says "client error".

According error log message:
Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Input value "pass" contains a non-scalar value. in Symfony\Component\HttpKernel\HttpKernel->handle() (line 81 of /home/webmaster/drupal-bare/vendor/symfony/http-kernel/HttpKernel.php).

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @hf_3d
  • Yes, indeed. I can reproduce this. I also seemed as if I was not completely logged in at first. When I visited the front page after PW reset I got logged out again. After resetting password again this didn't happen again. Though when logging out I sometimes got "To log in to this site, your browser must accept cookies from the domain my-drupal10-site.ddev.site." error message. But this also seems to stop after a few times.

    Happens with both D 10.0.2/10.0.3 and PRLP 8.x-1.8/8.x-1.x-dev.

    mkdir my-drupal10-site && \
    cd my-drupal10-site && \
    ddev config --project-type=drupal10 --docroot=web --create-docroot && \
    ddev start && \
    ddev composer create drupal/recommended-project -y && \
    ddev composer require drush/drush 'drupal/prlp:1.x-dev@dev' && \
    ddev drush -y site:install --account-name=admin --account-pass=admin && \
    ddev drush -y en prlp && \
    ddev drush cr && \
    ddev launch /user/password
    
    # Enter admin and submit
    
    ddev launch -m
    
    # Open mail and click reset link
    
  • Status changed to Needs review over 1 year ago
  • I don't know how backwards compatible this is. Needs a bit of research/testing. But I'm too tired now. Let's continue tomorrow.

  • Thanks, #3 seems to do the trick.

  • Status changed to RTBC over 1 year ago
  • Yo, seems this fix also works with Symfony 4 in Drupal 9. Got it up and running and could log-in+reset without any problem.

    I'm committing this now and release it.

    • leymannx β†’ committed e740147d on 8.x-1.x
      Issue #3339057 by leymannx, hf_3d: Password reset (at one-time login)...
  • Status changed to Fixed over 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024