add trim() to $_POST['auth_user'] & $_POST['auth_user2']

(cherry picked from commit 28a5469e25)
This commit is contained in:
heper 2019-01-16 11:24:43 +01:00 committed by jim-p
parent 1ef5b31bad
commit a9a90af672

View File

@ -189,11 +189,11 @@ EOD;
$passwd = $cpcfg['radmac_secret'];
$context = 'radmac'; // Radius MAC authentication
} elseif (!empty($_POST['auth_user2'])) {
$user = $_POST['auth_user2'];
$user = trim($_POST['auth_user2']);
$passwd = $_POST['auth_pass2'];
$context = 'second'; // Assume users to use the first context if auth_user2 is empty/does not exist
} else {
$user = $_POST['auth_user'];
$user = trim($_POST['auth_user']);
$passwd = $_POST['auth_pass'];
$context = 'first';
}