When using the password_policy_history plugin and set history_repeats to 0, the plugin is showing a confusing error message during validation.

When `history_repeats` is set to 0, the error message should be something like:
Previous passwords cannot be reused. Choose a different password.

But the error message actually seen is:
The last 0 passwords cannot be reused. Choose a different password.

Comments

mediabounds created an issue. See original summary.

mediabounds’s picture

Status: Active » Needs review
StatusFileSize
new1.5 KB

The plugin actually does have a special error message for when `history_repeats` is set to 0, but it immediately overwrites the special message with the default one. This patch fixes that.

jfurnas’s picture

Applied this patch today, and it works as intended.

gabrieldv’s picture

Assigned: Unassigned » gabrieldv

I'll try to review it, thanks for the patch @mediabounds =)

gabrieldv’s picture

Assigned: gabrieldv » Unassigned
Status: Needs review » Reviewed & tested by the community

I tested the #2 patch and it resolves the problem in this issue, i also runned the automated tests and it runs very good, so i'm moving this to RTBC.

gabrieldv’s picture

StatusFileSize
new36.89 KB

  • 0f9e1b9 committed on 8.x-3.x
    Issue #3314234 by mediabounds, gabrieldv, jfurnas: Password history...
paulocs’s picture

Status: Reviewed & tested by the community » Fixed

Thanks.

paulocs’s picture

Status: Fixed » Closed (fixed)

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