[Pkg-owncloud-commits] [owncloud] 49/74: Use `/` as redirect location if webroot is set to an empty value

David Prévot taffit at moszumanska.debian.org
Tue Dec 2 22:04:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit abc7f143da5acc5adeead45a862850c172f5cb52
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Fri Nov 21 15:35:14 2014 +0100

    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
---
 core/js/lostpassword.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js
index ad221cb..7bfaa38 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){

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list