diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-12-11 23:57:59 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-12-11 23:57:59 +0100 |
commit | 7969d6e64617235744889df42d0e671085a779a8 (patch) | |
tree | 23733e41a7d58cb2903429e3dfb417327c39d835 /lib/util.php | |
parent | cc0a0df88b3b6fdd2b1f9c85349683eb640f9670 (diff) | |
parent | f7f462f2733117cc2e3be0421e7ebca85bac1562 (diff) | |
download | nextcloud-server-7969d6e64617235744889df42d0e671085a779a8.tar.gz nextcloud-server-7969d6e64617235744889df42d0e671085a779a8.zip |
Merge branch 'master' into filesystem
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/util.php b/lib/util.php index 4a434114480..7cbac3a572b 100755 --- a/lib/util.php +++ b/lib/util.php @@ -320,10 +320,8 @@ class OC_Util { } if (isset($_REQUEST['redirect_url'])) { $redirect_url = OC_Util::sanitizeHTML($_REQUEST['redirect_url']); - } else { - $redirect_url = $_SERVER['REQUEST_URI']; - } - $parameters['redirect_url'] = $redirect_url; + $parameters['redirect_url'] = urlencode($redirect_url); + } OC_Template::printGuestPage("", "login", $parameters); } @@ -419,8 +417,8 @@ class OC_Util { * Redirect to the user default page */ public static function redirectToDefaultPage() { - if(isset($_REQUEST['redirect_url']) && (substr($_REQUEST['redirect_url'], 0, strlen(OC::$WEBROOT)) == OC::$WEBROOT || $_REQUEST['redirect_url'][0] == '/')) { - $location = $_REQUEST['redirect_url']; + if(isset($_REQUEST['redirect_url'])) { + $location = OC_Helper::makeURLAbsolute(urldecode($_REQUEST['redirect_url'])); } else if (isset(OC::$REQUESTEDAPP) && !empty(OC::$REQUESTEDAPP)) { $location = OC_Helper::linkToAbsolute( OC::$REQUESTEDAPP, 'index.php' ); |