feat(core): Check password strength on login (SQL Source). Closes #6025

This commit is contained in:
smizrahi
2024-12-02 10:59:51 +01:00
parent 5030922a7c
commit fe6836084e
9 changed files with 20 additions and 30 deletions

View File

@@ -233,3 +233,10 @@
"passwordRecovery_SecretQuestion2" = "What was your first car ?";
"passwordRecovery_SecretQuestion3" = "What is your favorite movie ?";
"passwordRecovery_SecondaryEmail" = "Secondary E-mail";
/* Password */
"POLICY_MIN_LOWERCASE_LETTER" = "Minimum of %{0} lowercase letter";
"POLICY_MIN_UPPERCASE_LETTER" = "Minimum of %{0} uppercase letter";
"POLICY_MIN_DIGIT" = "Minimum of %{0} digit";
"POLICY_MIN_SPECIAL_SYMBOLS" = "Minimum of %{0} special symbols";
"POLICY_MIN_LENGTH" = "Minimum length of %{0} characters";

View File

@@ -233,3 +233,10 @@
"passwordRecovery_SecretQuestion2" = "Quelle était votre première voiture ?";
"passwordRecovery_SecretQuestion3" = "Quel est votre film préféré ?";
"passwordRecovery_SecondaryEmail" = "E-mail secondaire";
/* Password */
"POLICY_MIN_LOWERCASE_LETTER" = "Au moins %{0} lettre(s) minuscule(s)";
"POLICY_MIN_UPPERCASE_LETTER" = "Au moins %{0} lettre(s) majuscule(s)";
"POLICY_MIN_DIGIT" = "Au moins %{0} chiffre(s)";
"POLICY_MIN_SPECIAL_SYMBOLS" = "Au moins %{0} caractère(s) special(aux)";
"POLICY_MIN_LENGTH" = "Longueur d'au moins %{0} caractère(s)";

View File

@@ -132,10 +132,3 @@ See <a href=\"http://www.sogo.nu/en/support/community.html\">this page</a> for v
"Password recovery email in error" = "Password recovery email in error";
"Password reset" = "Password reset";
"Hi %{0},\nThere was a request to change your password!\n\nIf you did not make this request then please ignore this email.\n\nOtherwise, please click this link to change your password: %{1}" = "Hi %{0},\nThere was a request to change your password!\n\nIf you did not make this request then please ignore this email.\n\nOtherwise, please click this link to change your password: %{1}";
/* Password */
"POLICY_MIN_LOWERCASE_LETTER" = "Minimum of %{0} lowercase letter";
"POLICY_MIN_UPPERCASE_LETTER" = "Minimum of %{0} uppercase letter";
"POLICY_MIN_DIGIT" = "Minimum of %{0} digit";
"POLICY_MIN_SPECIAL_SYMBOLS" = "Minimum of %{0} special symbols";
"POLICY_MIN_LENGTH" = "Minimum length of %{0} characters";

View File

@@ -129,10 +129,3 @@
"Password recovery email in error" = "Erreur lors de l'envoi de l'email de récupération";
"Password reset" = "Réinitialisation de mot de passe";
"Hi %{0},\nThere was a request to change your password!\n\nIf you did not make this request then please ignore this email.\n\nOtherwise, please click this link to change your password: %{1}" = "Bonjour %{0},\nUne demande de changement de mot de passe a été initiée.\n\nSi vous n'êtes pas à l'origine de cet e-mail, n'en tenez pas compte.\n\nSi vous en êtes bien à l'origine, veuillez cliquer sur le lien ci-dessous pour modifier votre mot de passe: %{1}";
/* Password */
"POLICY_MIN_LOWERCASE_LETTER" = "Au moins %{0} lettre(s) minuscule(s)";
"POLICY_MIN_UPPERCASE_LETTER" = "Au moins %{0} lettre(s) majuscule(s)";
"POLICY_MIN_DIGIT" = "Au moins %{0} chiffre(s)";
"POLICY_MIN_SPECIAL_SYMBOLS" = "Au moins %{0} caractère(s) special(aux)";
"POLICY_MIN_LENGTH" = "Longueur d'au moins %{0} caractère(s)";

View File

@@ -219,7 +219,7 @@ static const NSString *kJwtKey = @"jwt";
if ([*additionalLoginInformations objectForKey:@"userPolicies"]) {
translations = [[NSMutableDictionary alloc] init];
for (policy in [*additionalLoginInformations objectForKey:@"userPolicies"]) {
[translations setObject:[self labelForKey: [policy objectForKey:@"label"]] forKey: [policy objectForKey:@"label"]];
[translations setObject:[self commonLabelForKey: [policy objectForKey:@"label"]] forKey: [policy objectForKey:@"label"]];
}
[*additionalLoginInformations setObject:[SOGoPasswordPolicy createPasswordPolicyLabels: [*additionalLoginInformations objectForKey:@"userPolicies"] withTranslations: translations]
forKey:@"userPolicies"];

View File

@@ -274,11 +274,6 @@
"Confirmation" = "Confirmation";
"Change" = "Change";
"Passwords don't match" = "Passwords don't match";
"POLICY_MIN_LOWERCASE_LETTER" = "Minimum of %{0} lowercase letter";
"POLICY_MIN_UPPERCASE_LETTER" = "Minimum of %{0} uppercase letter";
"POLICY_MIN_DIGIT" = "Minimum of %{0} digit";
"POLICY_MIN_SPECIAL_SYMBOLS" = "Minimum of %{0} special symbols";
"POLICY_MIN_LENGTH" = "Minimum length of %{0} characters";
/* Event+task classifications */

View File

@@ -274,11 +274,7 @@
"Confirmation" = "Confirmation";
"Change" = "Changer";
"Passwords don't match" = "Les mots de passe ne correspondent pas";
"POLICY_MIN_LOWERCASE_LETTER" = "Au moins %{0} lettre(s) minuscule(s)";
"POLICY_MIN_UPPERCASE_LETTER" = "Au moins %{0} lettre(s) majuscule(s)";
"POLICY_MIN_DIGIT" = "Au moins %{0} chiffre(s)";
"POLICY_MIN_SPECIAL_SYMBOLS" = "Au moins %{0} caractère(s) special(aux)";
"POLICY_MIN_LENGTH" = "Longueur d'au moins %{0} caractère(s)";
/* Event+task classifications */

View File

@@ -278,7 +278,7 @@ static NSArray *reminderValues = nil;
userSource = [user authenticationSource];
for(policy in [userSource userPasswordPolicy]) {
[translations setObject:[self labelForKey:[policy objectForKey:@"label"]]
[translations setObject:[self commonLabelForKey:[policy objectForKey:@"label"]]
forKey: [policy objectForKey:@"label"]];
}
translatedUserPolicy = [SOGoPasswordPolicy createPasswordPolicyLabels: [userSource userPasswordPolicy]

View File

@@ -69,7 +69,6 @@
vm.passwordRecovery.passwordRecoveryEnabled = true;
vm.loginState = 'passwordchange';
vm.showLogin = false;
rippleDo('loginContent');
}
@@ -300,9 +299,9 @@
};
this.isInPasswordRecoveryMode = function () {
return (("SecretQuestion" == this.passwordRecovery.passwordRecoveryMode ||
"SecondaryEmail" == this.passwordRecovery.passwordRecoveryMode) &&
this.passwordRecovery.passwordRecoveryToken) ? true : false;
return (("SecretQuestion" == this.passwordRecovery.passwordRecoveryMode) ||
("SecondaryEmail" == this.passwordRecovery.passwordRecoveryMode &&
this.passwordRecovery.passwordRecoveryToken)) ? true : false;
};
this.passwordRecoveryAbort = function () {