change min_length password from 8 to 12
This commit is contained in:
parent
22e06bc5eb
commit
1a75e27097
5 changed files with 8 additions and 8 deletions
|
@ -659,7 +659,7 @@ en:
|
||||||
invalid: 'is invalid. Fill in a valid email address, example: address@mail.com'
|
invalid: 'is invalid. Fill in a valid email address, example: address@mail.com'
|
||||||
taken: 'already in use. Fill in another email'
|
taken: 'already in use. Fill in another email'
|
||||||
password:
|
password:
|
||||||
too_short: "is too short. Fill in a password with at least 8 characters"
|
too_short: "is too short. Fill in a password with at least 12 characters"
|
||||||
not_strong: "not strong enough. Fill in a stronger password"
|
not_strong: "not strong enough. Fill in a stronger password"
|
||||||
password_confirmation:
|
password_confirmation:
|
||||||
confirmation: ": The two passwords do not match"
|
confirmation: ": The two passwords do not match"
|
||||||
|
|
|
@ -660,7 +660,7 @@ fr:
|
||||||
invalid: 'est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com'
|
invalid: 'est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com'
|
||||||
taken: 'déjà utilisé. Saisir une autre adresse électronique.'
|
taken: 'déjà utilisé. Saisir une autre adresse électronique.'
|
||||||
password:
|
password:
|
||||||
too_short: "est trop court. Saisir un mot de passe avec au moins 8 caractères"
|
too_short: "est trop court. Saisir un mot de passe avec au moins 12 caractères"
|
||||||
not_strong: "n’est pas assez complexe. Saisir un mot de passe plus complexe"
|
not_strong: "n’est pas assez complexe. Saisir un mot de passe plus complexe"
|
||||||
password_confirmation:
|
password_confirmation:
|
||||||
confirmation: ': Les deux mots de passe ne correspondent pas'
|
confirmation: ': Les deux mots de passe ne correspondent pas'
|
||||||
|
|
|
@ -74,7 +74,7 @@ describe SuperAdmin, type: :model do
|
||||||
# 2 - somewhat guessable: protection from unthrottled online attacks. (guesses < 10^8)
|
# 2 - somewhat guessable: protection from unthrottled online attacks. (guesses < 10^8)
|
||||||
# 3 - safely unguessable: moderate protection from offline slow-hash scenario. (guesses < 10^10)
|
# 3 - safely unguessable: moderate protection from offline slow-hash scenario. (guesses < 10^10)
|
||||||
# 4 - very unguessable: strong protection from offline slow-hash scenario. (guesses >= 10^10)
|
# 4 - very unguessable: strong protection from offline slow-hash scenario. (guesses >= 10^10)
|
||||||
passwords = ['password', '12pass23', 'démarches ', 'démarches-simple', '{My-$3cure-p4ssWord}']
|
passwords = ['000000000000', '123456789123', 'megapass2024', 'lesdémarches', '{My-$3cure-p4ssWord}']
|
||||||
min_complexity = PASSWORD_COMPLEXITY_FOR_ADMIN
|
min_complexity = PASSWORD_COMPLEXITY_FOR_ADMIN
|
||||||
|
|
||||||
let(:email) { 'mail@beta.gouv.fr' }
|
let(:email) { 'mail@beta.gouv.fr' }
|
||||||
|
@ -89,7 +89,7 @@ describe SuperAdmin, type: :model do
|
||||||
let(:password) { 's' * (PASSWORD_MIN_LENGTH - 1) }
|
let(:password) { 's' * (PASSWORD_MIN_LENGTH - 1) }
|
||||||
|
|
||||||
it 'reports an error about password length (but not about complexity)' do
|
it 'reports an error about password length (but not about complexity)' do
|
||||||
expect(subject).to eq(["Le champ « Mot de passe » est trop court. Saisir un mot de passe avec au moins 8 caractères"])
|
expect(subject).to eq(["Le champ « Mot de passe » est trop court. Saisir un mot de passe avec au moins 12 caractères"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -390,7 +390,7 @@ describe User, type: :model do
|
||||||
# 2 - somewhat guessable: protection from unthrottled online attacks. (guesses < 10^8)
|
# 2 - somewhat guessable: protection from unthrottled online attacks. (guesses < 10^8)
|
||||||
# 3 - safely unguessable: moderate protection from offline slow-hash scenario. (guesses < 10^10)
|
# 3 - safely unguessable: moderate protection from offline slow-hash scenario. (guesses < 10^10)
|
||||||
# 4 - very unguessable: strong protection from offline slow-hash scenario. (guesses >= 10^10)
|
# 4 - very unguessable: strong protection from offline slow-hash scenario. (guesses >= 10^10)
|
||||||
passwords = ['password', '12pass23', 'démarches ', 'démarches-simple', '{My-$3cure-p4ssWord}']
|
passwords = ['000000000000', '123456789123', 'megapass2024', 'lesdémarches', '{My-$3cure-p4ssWord}']
|
||||||
min_complexity = PASSWORD_COMPLEXITY_FOR_ADMIN
|
min_complexity = PASSWORD_COMPLEXITY_FOR_ADMIN
|
||||||
|
|
||||||
subject do
|
subject do
|
||||||
|
@ -405,7 +405,7 @@ describe User, type: :model do
|
||||||
let(:password) { 's' * (PASSWORD_MIN_LENGTH - 1) }
|
let(:password) { 's' * (PASSWORD_MIN_LENGTH - 1) }
|
||||||
|
|
||||||
it 'reports an error about password length (but not about complexity)' do
|
it 'reports an error about password length (but not about complexity)' do
|
||||||
expect(subject).to eq(["Le champ « Mot de passe » est trop court. Saisir un mot de passe avec au moins 8 caractères"])
|
expect(subject).to eq(["Le champ « Mot de passe » est trop court. Saisir un mot de passe avec au moins 12 caractères"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -431,7 +431,7 @@ describe User, type: :model do
|
||||||
let(:password) { 's' * (PASSWORD_MIN_LENGTH - 1) }
|
let(:password) { 's' * (PASSWORD_MIN_LENGTH - 1) }
|
||||||
|
|
||||||
it 'reports an error about password length (but not about complexity)' do
|
it 'reports an error about password length (but not about complexity)' do
|
||||||
expect(subject).to eq(["Le champ « Mot de passe » est trop court. Saisir un mot de passe avec au moins 8 caractères"])
|
expect(subject).to eq(["Le champ « Mot de passe » est trop court. Saisir un mot de passe avec au moins 12 caractères"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ describe 'Signing up:' do
|
||||||
expect(page).to have_current_path new_user_registration_path
|
expect(page).to have_current_path new_user_registration_path
|
||||||
sign_up_with user_email, '1234567'
|
sign_up_with user_email, '1234567'
|
||||||
expect(page).to have_current_path user_registration_path
|
expect(page).to have_current_path user_registration_path
|
||||||
expect(page).to have_content "Le champ « Mot de passe » est trop court. Saisir un mot de passe avec au moins 8 caractères"
|
expect(page).to have_content "Le champ « Mot de passe » est trop court. Saisir un mot de passe avec au moins 12 caractères"
|
||||||
|
|
||||||
# Then with a good password
|
# Then with a good password
|
||||||
sign_up_with user_email, user_password
|
sign_up_with user_email, user_password
|
||||||
|
|
Loading…
Reference in a new issue