Skip to content

Commit 19dc33a

Browse files
author
wrongecho
committed
Show a 429 header when logins are blocked
1 parent c5e13fd commit 19dc33a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

login.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Login', log_action = 'Blocked', log_description = '$ip was blocked access to login due to IP lockout', log_ip = '$ip', log_user_agent = '$user_agent'");
4040

4141
// Inform user & quit processing page
42+
header("HTTP/1.1 429 Too Many Requests");
4243
exit("<h2>$config_app_name</h2>Your IP address has been blocked due to repeated failed login attempts. Please try again later. <br><br>This action has been logged.");
4344
}
4445

0 commit comments

Comments
 (0)