diff options
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 273107e9b8a..bde65dcc7d1 100644 --- a/lib/base.php +++ b/lib/base.php @@ -506,6 +506,12 @@ class OC{ require_once 'core/setup.php'; exit(); } + // Handle redirect URL for logged in users + if(isset($_REQUEST['redirect_url']) && OC_User::isLoggedIn()) { + $location = OC_Helper::makeURLAbsolute(urldecode($_REQUEST['redirect_url'])); + header( 'Location: '.$location ); + return; + } // Handle WebDAV if($_SERVER['REQUEST_METHOD']=='PROPFIND') { header('location: '.OC_Helper::linkToRemote('webdav')); @@ -670,7 +676,7 @@ class OC{ else { OC_User::unsetMagicInCookie(); } - header( 'Location: '.$_SERVER['REQUEST_URI'] ); + OC_Util::redirectToDefaultPage(); exit(); } return true; |