From 2bd1c17345e107e8a880f4e3255696802df7a29c Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Mon, 2 Feb 2015 15:09:59 +0100 Subject: Don't encode url unecessary twice The URL was previously encoded twice which leads to getting redirected to a 404 page when the password has been entered incorrect at least once. Testplan: - [ ] Opening `http://localhost/core/index.php?redirect_url=%2Fcore%2Findex.php%2Fsettings%2Fadmin` redirects to the admin page when providing the correct credentials - [ ] Opening `http://localhost/core/index.php?redirect_url=%2Fcore%2Findex.php%2Fsettings%2Fadmin` redirects to the admin page when providing the invalid credentials and then providing valid ones. - [ ] Logging in as admin then going to the admin page and clearing the cookies and refreshing will show the login and when repeating the above test steps you're redirected correctly. Fixes https://github.com/owncloud/core/issues/9804 --- lib/private/util.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/private/util.php') diff --git a/lib/private/util.php b/lib/private/util.php index c08cff81469..9a01ca3ac95 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -818,8 +818,7 @@ class OC_Util { $parameters['user_autofocus'] = true; } if (isset($_REQUEST['redirect_url'])) { - $redirectUrl = $_REQUEST['redirect_url']; - $parameters['redirect_url'] = urlencode($redirectUrl); + $parameters['redirect_url'] = $_REQUEST['redirect_url']; } $parameters['alt_login'] = OC_App::getAlternativeLogIns(); -- cgit v1.2.3