Adds rate limiting to the login page
							parent
							
								
									fee0616ca4
								
							
						
					
					
						commit
						f549940249
					
				| 
						 | 
				
			
			@ -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());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue