sessions: properly check for cookie being set
This commit is contained in:
parent
2751718009
commit
2137d67496
|
@ -103,15 +103,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 (isset($_COOKIE[$session_name])) {
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
if (!$_SESSION["uid"]) {
|
if (!$_SESSION["uid"]) {
|
||||||
session_destroy();
|
session_destroy();
|
||||||
if (isset($_COOKIE[session_name()])) {
|
|
||||||
setcookie(session_name(), '', time()-42000, '/');
|
setcookie(session_name(), '', time()-42000, '/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue