Do not allow empty passwords since this might cause problems for some authentication servers like ldap. Fixes #2326

This commit is contained in:
Ermal 2012-05-30 20:51:11 +00:00
parent 1710305617
commit 88165371ef

View File

@ -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");
?>
?>