diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-11-21 15:35:14 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-21 15:38:36 +0100 |
commit | 0fa8b449b21d2e2d5875c8300b86e8f7740f7598 (patch) | |
tree | 6772716c8340d5a786441f7216692a1f834dbbe2 /core | |
parent | 13b06aa6dfeb7c63750461529b27494ed035707d (diff) | |
download | nextcloud-server-0fa8b449b21d2e2d5875c8300b86e8f7740f7598.tar.gz nextcloud-server-0fa8b449b21d2e2d5875c8300b86e8f7740f7598.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
Diffstat (limited to 'core')
-rw-r--r-- | core/js/lostpassword.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js index 35173fd3d33..294a9d8c1cf 100644 --- a/core/js/lostpassword.js +++ b/core/js/lostpassword.js @@ -112,7 +112,11 @@ OC.Lostpassword = { }, redirect : function(msg){ - window.location = OC.webroot; + if(OC.webroot !== '') { + window.location = OC.webroot; + } else { + window.location = '/'; + } }, resetError : function(msg){ |