From fbf2a8616207424c845fbbae1ca69ddc7e1cf979 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 18 Sep 2013 07:24:34 +0200 Subject: [PATCH] [FIX] Properly redirect after login --- public/include/classes/user.class.php | 2 +- public/include/pages/login.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/include/classes/user.class.php b/public/include/classes/user.class.php index 6dc7acdf..62ff987a 100644 --- a/public/include/classes/user.class.php +++ b/public/include/classes/user.class.php @@ -427,7 +427,7 @@ class User { // Enforce a page reload and point towards login with referrer included, if supplied $location = @$_SERVER['HTTPS'] ? 'https' : 'http' . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']; if (!empty($from)) $location .= '?page=login&to=' . urlencode($from); - // if (!headers_sent()) header('Location: ' . $location, true, 307); + // if (!headers_sent()) header('Location: ' . $location); exit(''); } diff --git a/public/include/pages/login.inc.php b/public/include/pages/login.inc.php index 4dcae2dc..0dcf6774 100644 --- a/public/include/pages/login.inc.php +++ b/public/include/pages/login.inc.php @@ -8,7 +8,7 @@ if ($setting->getValue('maintenance') && !$user->isAdmin($user->getUserId($_POST } else if ($user->checkLogin(@$_POST['username'], @$_POST['password']) ) { empty($_POST['to']) ? $to = $_SERVER['PHP_SELF'] : $to = $_POST['to']; $location = @$_SERVER['HTTPS'] === true ? 'https' : 'http' . '://' . $_SERVER['SERVER_NAME'] . $to; - if (!headers_sent()) header('Location: ' . $location, true, 307); + if (!headers_sent()) header('Location: ' . $location); exit(''); } else if (@$_POST['username'] && @$_POST['password']) { $_SESSION['POPUP'][] = array('CONTENT' => 'Unable to login: '. $user->getError(), 'TYPE' => 'errormsg');