add yet another workaround for stuck login due to session cookies

master
Andrew Dolgov 12 years ago
parent 79bb55892b
commit 60ed4c9ad5

@ -492,9 +492,6 @@ class Handler_Public extends Handler {
} }
function login() { function login() {
@session_destroy();
@session_start();
$_SESSION["prefs_cache"] = array(); $_SESSION["prefs_cache"] = array();
if (!SINGLE_USER_MODE) { if (!SINGLE_USER_MODE) {
@ -503,6 +500,8 @@ class Handler_Public extends Handler {
$password = $_POST["password"]; $password = $_POST["password"];
$remember_me = $_POST["remember_me"]; $remember_me = $_POST["remember_me"];
@session_start();
if (authenticate_user($this->link, $login, $password)) { if (authenticate_user($this->link, $login, $password)) {
$_POST["password"] = ""; $_POST["password"] = "";

@ -107,6 +107,13 @@
if (!defined('TTRSS_SESSION_NAME') || TTRSS_SESSION_NAME != 'ttrss_api_sid') { if (!defined('TTRSS_SESSION_NAME') || TTRSS_SESSION_NAME != 'ttrss_api_sid') {
if ($_COOKIE[$session_name]) { if ($_COOKIE[$session_name]) {
@session_start(); @session_start();
if (!$_SESSION["uid"]) {
session_destroy();
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
}
} }
} }
?> ?>

Loading…
Cancel
Save