adding ratelimiting with reddis db
Deploy / deploy (push) Failing after 3s

This commit is contained in:
2026-05-06 09:27:02 +02:00
parent d82a08f77b
commit 5deb0e1056
16 changed files with 312 additions and 37 deletions
+2 -1
View File
@@ -49,9 +49,10 @@ else if ($_SESSION["needs_auth"]===false && $_SESSION["mfa_authenticated"]==1 &&
$user_id=$_SESSION["id"];
$valid_until=time()+(15*60);
$auth_token=bin2hex(random_bytes(128));
$auth_token_hash=auth_token_hash($auth_token);
$sql="INSERT INTO auth_tokens (auth_token,user_id, valid_until) VALUES(?,?,?);";
$stmt = mysqli_prepare($conn, $sql);
mysqli_stmt_bind_param($stmt, 'sii', $auth_token,$user_id,$valid_until);
mysqli_stmt_bind_param($stmt, 'sii', $auth_token_hash,$user_id,$valid_until);
mysqli_stmt_execute($stmt);
mysqli_stmt_close($stmt);
if(!empty($send_to)){