不要
This commit is contained in:
2
util.php
2
util.php
@@ -178,7 +178,6 @@ function assert_unless_success(Result $assertion, Throwable|string|null $descrip
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AUTH_ENABLED) {
|
|
||||||
function getcookie(string $name): string|null {
|
function getcookie(string $name): string|null {
|
||||||
return $_COOKIE[$name] ?? null;
|
return $_COOKIE[$name] ?? null;
|
||||||
}
|
}
|
||||||
@@ -219,7 +218,6 @@ if (AUTH_ENABLED) {
|
|||||||
function verify_csrf_token(string $token): bool {
|
function verify_csrf_token(string $token): bool {
|
||||||
return null !== getcookie('csrf_token') && hash_equals(getcookie('csrf_token'), $token);
|
return null !== getcookie('csrf_token') && hash_equals(getcookie('csrf_token'), $token);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function count_special_chars(string $str): int {
|
function count_special_chars(string $str): int {
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user