parent
3813ee78c3
commit
81f019b6c5
3 changed files with 6 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}</style><![endif]-->
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<?php if(!empty($_['redirect'])) { echo '<input type="hidden" name="redirect_url" value="'.$_['redirect'].'" />'; } ?>
|
||||
<?php if(!empty($_['redirect_url'])) { echo '<input type="hidden" name="redirect_url" value="'.$_['redirect_url'].'" />'; } ?>
|
||||
<ul>
|
||||
<?php if(isset($_['invalidcookie']) && ($_['invalidcookie'])): ?>
|
||||
<li class="errors">
|
||||
|
|
|
@ -656,7 +656,7 @@ class OC{
|
|||
else {
|
||||
OC_User::unsetMagicInCookie();
|
||||
}
|
||||
header( 'Location: '.$_SERVER['REQUEST_URI'] );
|
||||
OC_Util::redirectToDefaultPage();
|
||||
exit();
|
||||
}
|
||||
return true;
|
||||
|
|
10
lib/util.php
10
lib/util.php
|
@ -340,10 +340,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);
|
||||
}
|
||||
|
||||
|
@ -439,8 +437,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' );
|
||||
|
|
Loading…
Reference in a new issue