Skip to content

Commit

Permalink
Trim login creds
Browse files Browse the repository at this point in the history
  • Loading branch information
austinwbest committed Nov 26, 2023
1 parent ee82a4b commit 66014cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions root/app/www/public/ajax/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
logger($systemLog, 'credentials check', 'info');
list($user, $pass) = explode(':', $login);

//-- STRIP OUT THE SPACES AND LINE BREAKS USERS ACCIDENTALLY PROVIDE
$user = trim($user);
$pass = trim($pass);
$_POST['user'] = trim($_POST['user']);
$_POST['pass'] = trim($_POST['pass']);

logger($systemLog, 'file user: \'' . $user . '\'', 'info');
logger($systemLog, 'file pass: \'' . $pass . '\'', 'info');
logger($systemLog, 'post user: \'' . $_POST['user'] . '\'', 'info');
Expand Down

0 comments on commit 66014cb

Please sign in to comment.