mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not allow empty passwords since this might cause problems for some authentication servers like ldap. Fixes #2326
This commit is contained in:
parent
1710305617
commit
88165371ef
@ -1304,7 +1304,7 @@ function session_auth() {
|
||||
session_start();
|
||||
|
||||
/* Validate incoming login request */
|
||||
if (isset($_POST['login'])) {
|
||||
if (isset($_POST['login']) && !empty($_POST['usernamefld']) && !empty($_POST['passwordfld'])) {
|
||||
$authcfg = auth_get_authserver($config['system']['webgui']['authmode']);
|
||||
if (authenticate_user($_POST['usernamefld'], $_POST['passwordfld'], $authcfg) ||
|
||||
authenticate_user($_POST['usernamefld'], $_POST['passwordfld'])) {
|
||||
@ -1412,4 +1412,4 @@ function session_auth() {
|
||||
|
||||
Header("X-Frame-Options: SAMEORIGIN");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user