summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-11-21 15:35:14 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-11-24 11:12:01 +0100
commitabc7f143da5acc5adeead45a862850c172f5cb52 (patch)
treec0f78d33e56e8805d6fa7fd86ea696b6663160c3
parent3ff1f879e014c6be738b85fc7b9de6ca154520cc (diff)
downloadnextcloud-server-abc7f143da5acc5adeead45a862850c172f5cb52.tar.gz
nextcloud-server-abc7f143da5acc5adeead45a862850c172f5cb52.zip
Use `/` as redirect location if webroot is set to an empty value
If the webroot has been set to an empty value or ownCloud has been installed at the root location (`/``) there is a fair chance that the redirect for password resets does not work at all. This means that while the password is getting resetted the user is not redirected to the login page. I'm aware that it might be better to just set the webroot to `/` in those cases but this patch is better in the regard that it cannot break stuff. Thanks to @PVince81 for helping me debugging this. (I'm a moron and assumed it couldn't be THAT easy) Reported by @cdamken
-rw-r--r--core/js/lostpassword.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js
index ad221cb30fc..7bfaa38e791 100644
--- a/core/js/lostpassword.js
+++ b/core/js/lostpassword.js
@@ -115,7 +115,11 @@ OC.Lostpassword = {
},
redirect : function(msg){
- window.location = OC.webroot;
+ if(OC.webroot !== '') {
+ window.location = OC.webroot;
+ } else {
+ window.location = '/';
+ }
},
resetError : function(msg){