Project

General

Profile

« Previous | Next » 

Revision d427980c

Added by Ermal LUÇI about 13 years ago

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

View differences:

etc/inc/auth.inc
1276 1276
		session_start();
1277 1277

  
1278 1278
	/* Validate incoming login request */
1279
	if (isset($_POST['login'])) {
1279
	if (isset($_POST['login']) && !empty($_POST['usernamefld']) && !empty($_POST['passwordfld'])) {
1280 1280
		$authcfg = auth_get_authserver($config['system']['webgui']['authmode']);
1281 1281
		if (authenticate_user($_POST['usernamefld'], $_POST['passwordfld'], $authcfg) || 
1282 1282
		    authenticate_user($_POST['usernamefld'], $_POST['passwordfld'])) {

Also available in: Unified diff