From abeab594486f8d20f534aae68423f978eaa412a8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 7 Jun 2016 14:05:23 -0700 Subject: [PATCH] Fix redirect to Password settings panel after "Reset Password" login Summary: Fixes T11107. The URI change here meant we were dropping the "key" parameter, which allows you to set a new password without knowing your old one. Test Plan: Reset password, didn't need to provide old one anymore. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11107 Differential Revision: https://secure.phabricator.com/D16075 --- .../controller/PhabricatorAuthOneTimeLoginController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php b/src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php index d98879d0ed..627d1b43eb 100644 --- a/src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php +++ b/src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php @@ -139,7 +139,10 @@ final class PhabricatorAuthOneTimeLoginController ->save(); unset($unguarded); - $next = (string)id(new PhutilURI('/settings/panel/password/')) + $username = $target_user->getUsername(); + $panel_uri = "/settings/user/{$username}/page/password/"; + + $next = (string)id(new PhutilURI($panel_uri)) ->setQueryParams( array( 'key' => $key,