1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-20 20:51:50 +01:00

auth.php: check if cookie exists

This commit is contained in:
Zankaria 2024-05-11 00:29:46 +02:00
parent ed05049777
commit 4c731ba241

View File

@ -240,7 +240,7 @@ function check_login(bool $prompt = false): void {
$expected_cookie_name = calc_cookie_name($is_https, $is_path_jailed, $config['cookies']['mod']);
// Validate session
if (isset($expected_cookie_name)) {
if (isset($_COOKIE[$expected_cookie_name])) {
// Should be username:hash:salt
$cookie = explode(':', $_COOKIE[$expected_cookie_name]);
if (count($cookie) != 3) {