I believe this IF statement on line 239 in login_security.module (line 202 in 8.x, 1.2 and dev) always evaluates to TRUE:
if (!count($password_message) || !count($block_message)) {

In reviewing the code fix I suggested for this issue, I noticed that I was never getting results in both $password_message and $block_message. It looks like there is no password error message if the user account is blocked, and no blocked error message if the account doesn't exist or the password is wrong. As such, the count for one of those will always be zero and cause the IF to evaluate as TRUE.

Maybe the negations are not supposed to be there? If there was any chance that both variables would populate, that means those messages would be displayed and no attempts notice would appear, regardless of the settings for the drupal variables login_security_disable_core_login_error and login_security_notice_attempts_available (disable_core_login_error and notice_attempts_available in 8.x).

If the negations are removed, then it should be noted that the attempts message will not show if any other error message is received. I don't know if there might be any other error messages but I thought it beared mentioning.

This is also present in the 8.x branch, on line 202 in 8.x (1.2 and dev)

Comments

digital dogbreath created an issue. See original summary.

wsantell’s picture

Issue summary: View changes
salvis’s picture

Status: Active » Closed (outdated)

Thank you for the analysis. A more comprehensive fix is in #2941630: Fix the login failure error message detection.