mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Misc/Fixup
* HTTP_USER_AGENT is not guaranteed to be set
This commit is contained in:
@@ -43,7 +43,7 @@ class User
|
|||||||
$_SESSION['dataKey'] = Util::createHash(); // just some random numbers for identification purpose
|
$_SESSION['dataKey'] = Util::createHash(); // just some random numbers for identification purpose
|
||||||
|
|
||||||
self::$dataKey = $_SESSION['dataKey'];
|
self::$dataKey = $_SESSION['dataKey'];
|
||||||
self::$agent = $_SERVER['HTTP_USER_AGENT'];
|
self::$agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
|
||||||
|
|
||||||
if (!self::$ip)
|
if (!self::$ip)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user