Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.well-known/change-password isn't redirecting properly. #7024

Closed
sunscreem opened this issue Oct 16, 2020 · 8 comments
Closed

.well-known/change-password isn't redirecting properly. #7024

sunscreem opened this issue Oct 16, 2020 · 8 comments
Labels

Comments

@sunscreem
Copy link

sunscreem commented Oct 16, 2020

Description

Craft 3.5.13 has the new .well-known/change-password redirection, but it appears to throw a 500.

Steps to reproduce

  1. Update craft
  2. Visit your-domain/.well-known/change-password

Additional info

  • Craft version: 3.5.13.2
  • PHP version: 7.4.11
@sunscreem sunscreem added the bug label Oct 16, 2020
@brandonkelly
Copy link
Member

What error are you getting? If it’s not obvious, you can enable Dev Mode or clear out the contents of your storage/logs/ folder, reproduce the error, and then search storage/logs/web.log for [error].

@sunscreem
Copy link
Author

On the front end (in dev mode):

image

In the logs:

2020-10-16 17:09:59 [-][-][v4sp26d45a96du2tbgqfhucu0t][error][yii\web\HttpException:400] yii\web\BadRequestHttpException: Request missing required param in /home/forge/bic.sunscreem.xyz/vendor/craftcms/cms/src/web/Request.php:999
Stack trace:
#0 /home/forge/bic.sunscreem.xyz/vendor/craftcms/cms/src/controllers/UsersController.php(1943): craft\web\Request->getRequiredParam()
#1 /home/forge/bic.sunscreem.xyz/vendor/craftcms/cms/src/controllers/UsersController.php(436): craft\controllers\UsersController->_processTokenRequest()
#2 [internal function]: craft\controllers\UsersController->actionSetPassword()
#3 /home/forge/bic.sunscreem.xyz/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#4 /home/forge/bic.sunscreem.xyz/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams()
#5 /home/forge/bic.sunscreem.xyz/vendor/craftcms/cms/src/web/Controller.php(189): yii\base\Controller->runAction()
#6 /home/forge/bic.sunscreem.xyz/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction()
#7 /home/forge/bic.sunscreem.xyz/vendor/craftcms/cms/src/web/Application.php(274): yii\base\Module->runAction()
#8 /home/forge/bic.sunscreem.xyz/vendor/craftcms/cms/src/web/Application.php(577): craft\web\Application->runAction()
#9 /home/forge/bic.sunscreem.xyz/vendor/craftcms/cms/src/web/Application.php(253): craft\web\Application->_processActionRequest()
#10 /home/forge/bic.sunscreem.xyz/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest()
#11 /home/forge/bic.sunscreem.xyz/web/index.php(25): yii\base\Application->run()
#12 {main}
2020-10-16 17:09:59 [-][-][v4sp26d45a96du2tbgqfhucu0t][info][application] $_GET = []

@brandonkelly
Copy link
Member

Doh! I guess I should have tested the feature more thoroughly – I forgot that the setPasswordPath config setting defines the URI/template path for the Set Password form you get after clicking the link in the verification email.

I’ve just added a new setPasswordRequestPath config setting for the next release, which you can set in order to tell Craft where your “Forgot Password” form is located. If that’s set, then /.well-known/change-password requests will redirect to it.

@brandonkelly
Copy link
Member

Craft 3.5.14 is out now with that new config setting ✨

@sunscreem
Copy link
Author

@brandonkelly I'm still not seeing this as working :(

Just updated to 3.15.14.

Example:

https://gctltd.co.uk/.well-known/change-password

Just gives a 404 (I've not changed any password reset paths or anything).

@brandonkelly
Copy link
Member

@sunscreem Have you set the new setPasswordRequestPath config setting?

@sunscreem
Copy link
Author

Hey @brandonkelly I've not. Would this feature would work with the default password reset path?

@brandonkelly
Copy link
Member

There is no default path, which is why I added that config setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants