I'm not sure if this issue is related? https://www.drupal.org/node/2326265

Just noticed this problem when testing for other recent issues. This is a situation where the username constraint is enabled.

If I start typing a password before a username is entered, I receive the constraint error "Password must not contain their username." Even though I've entered a valid password, the error message remains.

Either the message should not be displayed (since the username field is empty), or the message should state something like "Username field is empty, enter a name to complete password check."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AohRveTPV’s picture

This applied after #2478199-20: Notice: Undefined property: stdClass::$name in password_policy_drupal_strength_constraint may fix. It changes the constraint to be met when no username exists.

AohRveTPV’s picture

#1 may not be technically correct because a Drupal username can be "0", I think. (Drupal would not allow that username via the web interface, but it might by other means.)

ron_s’s picture

Yes, I think #2 is the right approach. So add the patch from #2 as an addition to what I posted on #20 in 2478199?

  • AohRveTPV committed 0d4f25b on 7.x-2.x
    Issue #2499359 by AohRveTPV: Must not contain username error when...
AohRveTPV’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.