From: Andrew Dolgov Date: Fri, 17 Mar 2006 05:11:45 +0000 (+0100) Subject: fix ?rt= handling in login.php X-Git-Tag: 1.1.4~5 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1f0d3e07659dba7cd4ff6592f85cc6cef66e58eb;p=tt-rss.git fix ?rt= handling in login.php --- diff --git a/login.php b/login.php index 6f9bc1c9..733be8c9 100644 --- a/login.php +++ b/login.php @@ -18,6 +18,7 @@ $login = $_POST["login"]; $password = $_POST["password"]; + $return_to = $_POST["rt"]; if ($_COOKIE["ttrss_sid"]) { require_once "sessions.php"; @@ -41,20 +42,14 @@ if (authenticate_user($link, $login, $password)) { initialize_user_prefs($link, $_SESSION["uid"]); - if ($_SESSION["login_redirect"]) { - $redirect_to = $_SESSION["login_redirect"]; - } else { - $redirect_to = "tt-rss.php"; + if (!$return_to) { + $return_to = "tt-rss.php"; } - header("Location: $redirect_base/$redirect_to"); + header("Location: $redirect_base/$return_to"); exit; } } - if ($_GET["rt"]) { - $_SESSION["login_redirect"] = $_GET["rt"]; - } - ?> @@ -90,6 +85,7 @@ +