Allow same host redirects (/somepath).
This commit is contained in:
parent
f589df7366
commit
9e7c28835b
|
@ -323,7 +323,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) {
|
||||
OC_Log::write('core','redirectToDefaultPage',OC_Log::DEBUG);
|
||||
if(isset($_REQUEST['redirect_url']) && (substr($_REQUEST['redirect_url'], 0, strlen(OC::$WEBROOT)) == OC::$WEBROOT || $_REQUEST['redirect_url'][0] == '/')) {
|
||||
header( 'Location: '.$_REQUEST['redirect_url']);
|
||||
} else {
|
||||
header( 'Location: '.OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', '?app=files'));
|
||||
|
|
Loading…
Reference in New Issue