1
1
Fork 0

Merge pull request #9067 from MrPetovan/bug/9065-csrf-anonymous

Re-allow anonymous use of CSRF tokens
This commit is contained in:
Tobias Diekershoff 2020-08-24 18:36:21 +02:00 committed by GitHub
commit 5ab4503140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,11 +140,7 @@ abstract class BaseModule
return false;
}
if (empty($a->user)) {
return false;
}
$sec_hash = hash('whirlpool', $a->user['guid'] . $a->user['prvkey'] . session_id() . $x[0] . $typename);
$sec_hash = hash('whirlpool', ($a->user['guid'] ?? '') . ($a->user['prvkey'] ?? '') . session_id() . $x[0] . $typename);
return ($sec_hash == $x[1]);
}