Adds rate limiting to the login page

main
Yasen Pramatarov 2024-12-07 15:38:13 +02:00
parent fee0616ca4
commit f549940249
1 changed files with 44 additions and 40 deletions

View File

@ -22,6 +22,7 @@ try {
$dbWeb = connectDB($config);
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
try {
$username = $_POST['username'];
$password = $_POST['password'];
@ -66,6 +67,9 @@ try {
header('Location: ' . htmlspecialchars($app_root));
exit();
}
} catch (Exception $e) {
$error = $e->getMessage();
}
}
} catch (Exception $e) {
$error = getError('There was an unexpected error. Please try again.', $e->getMessage());