Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increases password minimum length to 14 characters #653

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/shared/users/_form_password_settings.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ h2.govuk-heading-l
span.govuk-warning-text__assistive Warning
p.text-underline Please improve your password
p#password-too-short
' It must be at least 10 characters.
' It must be at least 14 characters.
p#parts-of-email It shouldn't include part or all of your email address.
p#password-entropy
' It must be more complex. Consider using whole sentences (with spaces), lyrics or phrases to make it more memorable. Alternatively use password management software to generate a secure password.
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/users/_password_change.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.input-group
= f.input :password,
input_html: { class: 'medium js-disable-copy',
data: { min_password_length: "10" },
data: { min_password_length: "14" },
autocomplete: "off",
aria: { invalid: 'false' } },
label: 'New password',
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/users/_password_guidance.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
strong.govuk-warning-text__text aria-live="polite"
p.text-underline Please improve your password
p#password-too-short
' It must be at least 10 characters.
' It must be at least 14 characters.
p#parts-of-email It shouldn't include part or all of your email address.
p#password-entropy
' It must be more complex. Consider using whole sentences (with spaces), lyrics or phrases to make it more memorable.
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

# ==> Configuration for :validatable
# Range for password length. Default is 6..128.
config.password_length = 10..128
config.password_length = 14..128

# Regex to use to validate the email address
# config.email_regexp = /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
Expand Down
4 changes: 2 additions & 2 deletions spec/models/admin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
email: "[email protected]",
first_name: "John",
last_name: "Smith",
password: "^#ur9EkLm@1W",
password_confirmation: "^#ur9EkLm@1W"
password: "^#ur9EkLm@1Wab",
password_confirmation: "^#ur9EkLm@1Wab"
)

expect(admin.autosave_token).not_to be nil
Expand Down
Loading