ユーザーは存在したらも、ログインが失敗したらエラーを発生する

This commit is contained in:
2025-12-12 12:39:53 +09:00
parent 83a6d5c3de
commit 6d6fa82fcf
2 changed files with 10 additions and 6 deletions

View File

@@ -113,9 +113,9 @@ function to_money($amount, $lang) {
}
function randstr(): string {
srand(floor(time() / (60*60*24)));
$len = rand() % 20;
return bin2hex(random_bytes($len / 2));
srand((int)floor(time() / (60*60*24)));
$len = rand(1, 20);
return bin2hex(random_bytes($len));
}
function assert_null(mixed $assertion, Throwable|string|null $description = null): bool {