Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 378cad7

Browse files
committed
Fix #958 - Reset Password is broken due to URL rewriting when guest user is enabled.
1 parent f5075e3 commit 378cad7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/plugins/gui.user/class.UserGuiController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ public function processUserAccessPoint($action, $httpVars, $fileVars)
6969
$uri = trim(str_replace(rtrim($realUri, "/")."/user", "", $requestURI), "/");
7070
$uriParts = explode("/", $uri);
7171
$action = array_shift($uriParts);
72+
$key = ($action == "reset-password" && count($uriParts)) ? array_shift($uriParts) : "";
7273
try{
7374
$this->processSubAction($action, $uriParts);
7475
$_SESSION['OVERRIDE_GUI_START_PARAMETERS'] = array(
7576
"REBASE"=>"../../",
76-
"USER_GUI_ACTION" => $action
77+
"USER_GUI_ACTION" => $action,
78+
"USER_ACTION_KEY" => $key
7779
);
7880
}catch(Exception $e){
7981
$_SESSION['OVERRIDE_GUI_START_PARAMETERS'] = array(

core/src/plugins/gui.user/manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
conn.addParameter("get_action", "reset-password");
101101
conn.addParameter("new_pass", userPass);
102102
conn.addParameter("user_id", oForm.down('#user_id').getValue());
103-
conn.addParameter("key", $A(document.location.pathname.trim('/').split('/')).last());
103+
conn.addParameter("key", pydioBootstrap.parameters.get('USER_ACTION_KEY'));
104104
conn.onComplete = onComplete;
105105
conn.sendAsync();
106106
}

0 commit comments

Comments
 (0)