diff options
author | Michiel de Jong <michiel@unhosted.org> | 2012-05-18 17:11:01 +0400 |
---|---|---|
committer | Michiel de Jong <michiel@unhosted.org> | 2012-05-18 17:11:01 +0400 |
commit | 9b5e8a2c634e07d9c6e1693158e224eda7e5f673 (patch) | |
tree | aa9773c0251597bcedf749542198b1dd1bfc89e4 | |
parent | ea33b4aaa104252ff344e93a434e6c2eedcf438b (diff) |
fix redirect to desired page after login
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | lib/util.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php index 9cec3201e1c..8eea0fe454f 100644 --- a/index.php +++ b/index.php @@ -117,6 +117,6 @@ elseif(OC_User::isLoggedIn()) { if(!array_key_exists('sectoken', $_SESSION) || (array_key_exists('sectoken', $_SESSION) && is_null(OC::$REQUESTEDFILE)) || substr(OC::$REQUESTEDFILE, -3) == 'php'){ $sectoken=rand(1000000,9999999); $_SESSION['sectoken']=$sectoken; - OC_Template::printGuestPage('', 'login', array('error' => $error, 'sectoken' => $sectoken, 'redirect' => isset($_REQUEST['redirect_url'])?htmlentities($_REQUEST['redirect_url']):'' )); + OC_Template::printGuestPage('', 'login', array('error' => $error, 'sectoken' => $sectoken, 'redirect' => $_SERVER['REQUEST_URI'])); } } diff --git a/lib/util.php b/lib/util.php index 3c5eae2c0ad..0e4f3689e79 100644 --- a/lib/util.php +++ b/lib/util.php @@ -312,7 +312,7 @@ class OC_Util { */ public static function redirectToDefaultPage(){ if(isset($_REQUEST['redirect_url'])) { - header( 'Location: '.htmlentities($_REQUEST['redirect_url'])); + header( 'Location: '.$_REQUEST['redirect_url']); } else { header( 'Location: '.OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', '?app=files')); } |