check password even for guests if set

This commit is contained in:
Uwe Steinmann 2016-03-23 12:32:47 +01:00
parent 22e2c851e8
commit e5bd281d28

View File

@ -190,7 +190,7 @@ if (is_bool($user)) {
// Check if password matches (if not a guest user)
// Assume that the password has been sent via HTTP POST. It would be careless
// (and dangerous) for passwords to be sent via GET.
if (($userid != $settings->_guestID) && (md5($pwd) != $user->getPwd())) {
if (($userid != $settings->_guestID) && (md5($pwd) != $user->getPwd()) || ($userid == $settings->_guestID) && $user->getPwd() && (md5($pwd) != $user->getPwd())) {
_printMessage(getMLText("login_error_title"), getMLText("login_error_text"));
/* if counting of login failures is turned on, then increment its value */
if($settings->_loginFailure) {