From cdae6aefd8f4f672b3394281aff6ed72d9cbc938 Mon Sep 17 00:00:00 2001 From: Akhil Date: Thu, 7 May 2026 16:42:20 +0530 Subject: [PATCH 01/13] feat: add new password length rules --- l10n/de.js | 5 ++++- l10n/de.json | 5 ++++- l10n/de_DE.js | 5 ++++- l10n/de_DE.json | 5 ++++- l10n/en.js | 5 ++++- l10n/en.json | 5 ++++- l10n/es.js | 5 ++++- l10n/es.json | 5 ++++- l10n/fr.js | 5 ++++- l10n/fr.json | 5 ++++- l10n/it.js | 5 ++++- l10n/it.json | 5 ++++- lib/Controller/AccountController.php | 13 ++++++++----- src/signup/RegistrationForm.vue | 2 +- 14 files changed, 57 insertions(+), 18 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index 5a5a6a83..17969f2b 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -73,7 +73,7 @@ OC.L10N.register( "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", - "Incorrect password length: Required length is 8 to 32": "Falsche Passwortlänge: Erforderliche Länge ist 8 bis 32", + "Incorrect password length: Required length is 12 to 128": "Falsche Passwortlänge: Erforderliche Länge ist 12 bis 128", "Use an alternative email": "Verwenden Sie eine alternative E-Mail", "Important:": "Das ist wichtig:", "For security reasons, a recovery email is required.": "Aus Sicherheitsgründen ist eine Wiederherstellungs-E-Mail erforderlich.", @@ -82,6 +82,9 @@ OC.L10N.register( "A server-side error occurred while processing your request! Please try again later.": "Ein serverseitiger Fehler ist bei der Bearbeitung Ihrer Anfrage aufgetreten! Bitte versuchen Sie es später noch einmal.", "An error occurred while creating your account!": "Beim Anlegen Ihres Kontos ist ein Fehler aufgetreten!", "Username is too large.": "Der Benutzername ist zu groß.", + "Username is too small.": "Der Benutzername ist zu kurz.", + "Password is too large.": "Das Passwort ist zu groß.", + "Password is too small.": "Das Passwort ist zu kurz.", "Display name is too large.": "Der Anzeigename ist zu groß.", "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten.", diff --git a/l10n/de.json b/l10n/de.json index 06d7bc6d..76e077df 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -71,7 +71,7 @@ "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", - "Incorrect password length: Required length is 8 to 32": "Falsche Passwortlänge: Erforderliche Länge ist 8 bis 32", + "Incorrect password length: Required length is 12 to 128": "Falsche Passwortlänge: Erforderliche Länge ist 12 bis 128", "Use an alternative email": "Verwenden Sie eine alternative E-Mail", "Important:": "Das ist wichtig:", "For security reasons, a recovery email is required.": "Aus Sicherheitsgründen ist eine Wiederherstellungs-E-Mail erforderlich.", @@ -80,6 +80,9 @@ "A server-side error occurred while processing your request! Please try again later.": "Ein serverseitiger Fehler ist bei der Bearbeitung Ihrer Anfrage aufgetreten! Bitte versuchen Sie es später noch einmal.", "An error occurred while creating your account!": "Beim Anlegen Ihres Kontos ist ein Fehler aufgetreten!", "Username is too large.": "Der Benutzername ist zu groß.", + "Username is too small.": "Der Benutzername ist zu kurz.", + "Password is too large.": "Das Passwort ist zu groß.", + "Password is too small.": "Das Passwort ist zu kurz.", "Display name is too large.": "Der Anzeigename ist zu groß.", "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten.", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index a4518934..81ba5c73 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -73,7 +73,7 @@ OC.L10N.register( "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", - "Incorrect password length: Required length is 8 to 32": "Falsche Passwortlänge: Erforderliche Länge ist 8 bis 32", + "Incorrect password length: Required length is 12 to 128": "Falsche Passwortlänge: Erforderliche Länge ist 12 bis 128", "Use an alternative email": "Verwenden Sie eine alternative E-Mail", "Important:": "Das ist wichtig:", "For security reasons, a recovery email is required.": "Aus Sicherheitsgründen ist eine Wiederherstellungs-E-Mail erforderlich.", @@ -83,6 +83,9 @@ OC.L10N.register( "An error occurred while creating your account!": "Beim Anlegen Ihres Kontos ist ein Fehler aufgetreten!", "Username is too large.": "Der Benutzername ist zu groß.", "Display name is too large.": "Der Anzeigename ist zu groß.", + "Username is too large.": "Der Benutzername ist zu kurz.", + "Password is too large.": "Das Passwort ist zu groß.", + "Password is too small.": "Das Passwort ist zu kurz.", "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten.", "Your browser does not support the required encryption. Please use an up-to-date browser to continue.": "Ihr Browser unterstützt die erforderliche Verschlüsselung nicht. Bitte aktualisieren Sie Ihren Browser, um fortzufahren." diff --git a/l10n/de_DE.json b/l10n/de_DE.json index ae9c75fe..a2abe450 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -71,7 +71,7 @@ "Success!": "Erfolgreich!", "Your __username__@__domain__ account was successfully created.": "Ihr __username__@__domain__-Konto wurde erfolgreich erstellt.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Wenn Sie Ihre murena.io-E-Mail in einer Mail-Anwendung wie Thunderbird, Outlook oder einer anderen nutzen möchten, besuchen Sie bitte diese Seite.", - "Incorrect password length: Required length is 8 to 32": "Falsche Passwortlänge: Erforderliche Länge ist 8 bis 32", + "Incorrect password length: Required length is 12 to 128": "Falsche Passwortlänge: Erforderliche Länge ist 12 bis 128", "Use an alternative email": "Verwenden Sie eine alternative E-Mail", "Important:": "Das ist wichtig:", "For security reasons, a recovery email is required.": "Aus Sicherheitsgründen ist eine Wiederherstellungs-E-Mail erforderlich.", @@ -80,6 +80,9 @@ "A server-side error occurred while processing your request! Please try again later.": "Ein serverseitiger Fehler ist bei der Bearbeitung Ihrer Anfrage aufgetreten! Bitte versuchen Sie es später noch einmal.", "An error occurred while creating your account!": "Beim Anlegen Ihres Kontos ist ein Fehler aufgetreten!", "Username is too large.": "Der Benutzername ist zu groß.", + "Username is too small.": "Der Benutzername ist zu kurz.", + "Password is too large.": "Das Passwort ist zu groß.", + "Password is too small.": "Das Passwort ist zu kurz.", "Display name is too large.": "Der Anzeigename ist zu groß.", "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten.", diff --git a/l10n/en.js b/l10n/en.js index 9209b1ff..9c5da67a 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -76,7 +76,7 @@ OC.L10N.register( "Success!": "Success!", "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", - "Incorrect password length: Required length is 8 to 32": "Incorrect password length: Required length is 8 to 32", + "Incorrect password length: Required length is 12 to 128": "Incorrect password length: Required length is 12 to 128", "Use an alternative email": "Use an alternative email", "Important:": "Important:", "For security reasons, a recovery email is required.": "For security reasons, a recovery email is required.", @@ -85,6 +85,9 @@ OC.L10N.register( "A server-side error occurred while processing your request! Please try again later.": "A server-side error occurred while processing your request! Please try again later.", "An error occurred while creating your account!": "An error occurred while creating your account!", "Username is too large.": "Username is too large.", + "Username is too small.": "Username is too small.", + "Password is too large.": "Password is too large.", + "Password is too small.": "Password is too small.", "Display name is too large.": "Display name is too large.", "Password has invalid characters.": "Password has invalid characters.", "I want to stay informed about Murena for business offers.": "I want to stay informed about Murena for business offers.", diff --git a/l10n/en.json b/l10n/en.json index d6e8e1ad..ce707294 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -73,7 +73,7 @@ "Success!": "Success!", "Your __username__@__domain__ account was successfully created.": "Your __username__@__domain__ account was successfully created.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.", - "Incorrect password length: Required length is 8 to 32": "Incorrect password length: Required length is 8 to 32", + "Incorrect password length: Required length is 12 to 128": "Incorrect password length: Required length is 12 to 128", "Use an alternative email": "Use an alternative email", "Important:": "Important:", "For security reasons, a recovery email is required.": "For security reasons, a recovery email is required.", @@ -83,6 +83,9 @@ "An error occurred while creating your account!": "An error occurred while creating your account!", "Username is too large.": "Username is too large.", "Display name is too large.": "Display name is too large.", + "Username is too small.": "Username is too small.", + "Password is too large.": "Password is too large.", + "Password is too small.": "Password is too small.", "Password has invalid characters.": "La contraseña tiene caracteres no válidos.", "I want to stay informed about Murena for business offers.": "I want to stay informed about Murena for business offers.", "Your browser does not support the required encryption. Please use an up-to-date browser to continue.": "Your browser does not support the required encryption. Please use an up-to-date browser to continue." diff --git a/l10n/es.js b/l10n/es.js index 33231868..8cd2ff38 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -75,7 +75,7 @@ OC.L10N.register( "Success!": "¡Éxito!", "Your __username__@__domain__ account was successfully created.": "Su cuenta __username__@__domain__ se ha creado correctamente.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página.", - "Incorrect password length: Required length is 8 to 32": "Longitud de contraseña incorrecta: La longitud requerida es de 8 a 32", + "Incorrect password length: Required length is 12 to 128": "Longitud de contraseña incorrecta: La longitud requerida es de 12 a 128", "Use an alternative email": "Utilizar un correo electrónico alternativo", "Important:": "Importante:", "For security reasons, a recovery email is required.": "Por razones de seguridad, se requiere un correo electrónico de recuperación.", @@ -84,6 +84,9 @@ OC.L10N.register( "A server-side error occurred while processing your request! Please try again later.": "Hubo un error en el servidor al procesar tu solicitud. Por favor, inténtalo más tarde.", "An error occurred while creating your account!": "¡Hubo un error creando tu cuenta!", "Username is too large.": "El nombre de usuario es demasiado grande.", + "Username is too small.": "El nombre de usuario es demasiado corto.", + "Password is too large.": "La contraseña es demasiado grande.", + "Password is too small.": "La contraseña es demasiado corta.", "Display name is too large.": "El nombre para mostrar es demasiado grande.", "Password has invalid characters.": "La contraseña tiene caracteres no válidos.", "I want to stay informed about Murena for business offers.": "Deseo permanecer informado sobre las ofertas de Murena para empresas.", diff --git a/l10n/es.json b/l10n/es.json index 88c4ba50..09960868 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -74,7 +74,7 @@ "Success!": "¡Éxito!", "Your __username__@__domain__ account was successfully created.": "Su cuenta __username__@__domain__ se ha creado correctamente.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si desea utilizar su correo electrónico de murena.io en una aplicación de correo como Thunderbird, Outlook u otra, visite esta página.", - "Incorrect password length: Required length is 8 to 32": "Longitud de contraseña incorrecta: La longitud requerida es de 8 a 32", + "Incorrect password length: Required length is 12 to 128": "Longitud de contraseña incorrecta: La longitud requerida es de 12 a 128", "Use an alternative email": "Utilizar un correo electrónico alternativo", "Important:": "Importante:", "For security reasons, a recovery email is required.": "Por razones de seguridad, se requiere un correo electrónico de recuperación.", @@ -83,6 +83,9 @@ "A server-side error occurred while processing your request! Please try again later.": "Hubo un error en el servidor al procesar tu solicitud. Por favor, inténtalo más tarde.", "An error occurred while creating your account!": "¡Hubo un error creando tu cuenta!", "Username is too large.": "El nombre de usuario es demasiado grande.", + "Username is too small.": "El nombre de usuario es demasiado corto.", + "Password is too large.": "La contraseña es demasiado grande.", + "Password is too small.": "La contraseña es demasiado corta.", "Display name is too large.": "El nombre para mostrar es demasiado grande.", "Password has invalid characters.": "Password has invalid characters.", "I want to stay informed about Murena for business offers.": "Deseo permanecer informado sobre las ofertas de Murena para empresas.", diff --git a/l10n/fr.js b/l10n/fr.js index 25481a16..1dad4a0a 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -74,7 +74,7 @@ OC.L10N.register( "Success!": "Succès !", "Your __username__@__domain__ account was successfully created.": "Votre compte __username__@__domain__ a été créé avec succès.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si vous souhaitez utiliser votre email murena.io dans une application de messagerie comme Thunderbird, Outlook ou autre, veuillez visiter cette page.", - "Incorrect password length: Required length is 8 to 32":"ngueur de mot de passe incorrecte : La longueur requise est comprise entre 8 et 32", + "Incorrect password length: Required length is 12 to 128":"ngueur de mot de passe incorrecte : La longueur requise est comprise entre 12 et 128", "Use an alternative email": "Utiliser un autre courriel", "Important:": "Important :", "For security reasons, a recovery email is required.": "Pour des raisons de sécurité, un courriel de récupération est nécessaire.", @@ -83,6 +83,9 @@ OC.L10N.register( "A server-side error occurred while processing your request! Please try again later.": "Erreur du serveur dans la gestion de votre demande ! Merci d'essayer ultérieurement.", "An error occurred while creating your account!": "Une erreur s'est produite lors de la création de votre compte!", "Username is too large.": "Le nom d'utilisateur est trop grand.", + "Username is too small.": "Le nom d'utilisateur est trop court.", + "Password is too large.": "Le mot de passe est trop grand.", + "Password is too small.": "Le mot de passe est trop court.", "Display name is too large.": "Le nom affiché est trop grand.", "Password has invalid characters.": "Le mot de passe contient des caractères non valides.", "I want to stay informed about Murena for business offers.": "Je souhaite rester informé·e des offres Murena pour les entreprises.", diff --git a/l10n/fr.json b/l10n/fr.json index 2c80d3a5..96712c39 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -73,7 +73,7 @@ "Success!": "Succès !", "Your __username__@__domain__ account was successfully created.": "Votre compte __username__@__domain__ a été créé avec succès.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Si vous souhaitez utiliser votre email murena.io dans une application de messagerie comme Thunderbird, Outlook ou autre, veuillez visiter cette page.", - "Incorrect password length: Required length is 8 to 32":"ngueur de mot de passe incorrecte : La longueur requise est comprise entre 8 et 32", + "Incorrect password length: Required length is 12 to 128":"ngueur de mot de passe incorrecte : La longueur requise est comprise entre 12 et 128", "Use an alternative email": "Utiliser un autre courriel", "Important:": "Important :", "For security reasons, a recovery email is required.": "Pour des raisons de sécurité, un courriel de récupération est nécessaire.", @@ -82,6 +82,9 @@ "A server-side error occurred while processing your request! Please try again later.": "Erreur du serveur dans la gestion de votre demande ! Merci d'essayer ultérieurement.", "An error occurred while creating your account!": "Une erreur s'est produite lors de la création de votre compte!", "Username is too large.": "Le nom d'utilisateur est trop grand.", + "Username is too small.": "Le nom d'utilisateur est trop court.", + "Password is too large.": "Le mot de passe est trop grand.", + "Password is too small.": "Le mot de passe est trop court.", "Display name is too large.": "Le nom affiché est trop grand.", "Password has invalid characters.": "Le mot de passe contient des caractères non valides.", "I want to stay informed about Murena for business offers.": "Je souhaite rester informé·e des offres Murena pour les entreprises.", diff --git a/l10n/it.js b/l10n/it.js index a18bfeab..7174418e 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -74,7 +74,7 @@ OC.L10N.register( "Success!": "Successo!", "Your __username__@__domain__ account was successfully created.": "L'account __username__@__domain__ è stato creato con successo.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Se si desidera utilizzare l'e-mail di murena.io in un'applicazione di posta elettronica come Thunderbird, Outlook o altre, visitare questa pagina.", - "Incorrect password length: Required length is 8 to 32":"Lunghezza della password errata: La lunghezza richiesta è da 8 a 32", + "Incorrect password length: Required length is 12 to 128":"Lunghezza della password errata: La lunghezza richiesta è da 12 a 128", "Use an alternative email": "Utilizzare un'e-mail alternativa", "Important:": "Importante:", "For security reasons, a recovery email is required.": "Per motivi di sicurezza, è necessaria un'e-mail di recupero.", @@ -83,6 +83,9 @@ OC.L10N.register( "A server-side error occurred while processing your request! Please try again later.": "Si è verificato un errore lato server nel processare la tua richiesta! Ritenta più tardi.", "An error occurred while creating your account!": "Si è verificato un errore nella creazione dell'account!", "Username is too large.": "Il nome utente è troppo grande.", + "Username is too small.": "Il nome utente è troppo breve.", + "Password is too large.": "La password is too grande.", + "Password is too small.": "La password è troppo breve.", "Display name is too large.": "Il nome del display è troppo grande.", "Password has invalid characters.": "La password contiene caratteri non validi.", "I want to stay informed about Murena for business offers.": "Desidero ricevere informazioni sulle offerte commerciali di Murena.", diff --git a/l10n/it.json b/l10n/it.json index 3989a8d8..525183f8 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -69,7 +69,7 @@ "Recovery Email is required.": "L'e-mail di recupero è necessaria.", "You must read and accept the Terms of Service to create your account.": "Per creare il proprio account è necessario leggere e accettare i Termini di servizio.", "If you want to use your murena.io email in a mail app like Thunderbird, Outlook or another, please visit this page.": "Se si desidera utilizzare l'e-mail di murena.io in un'applicazione di posta elettronica come Thunderbird, Outlook o altre, visitare questa pagina.", - "Incorrect password length: Required length is 8 to 32":"Lunghezza della password errata: La lunghezza richiesta è da 8 a 32", + "Incorrect password length: Required length is 12 to 128":"Lunghezza della password errata: La lunghezza richiesta è da 12 a 128", "Use an alternative email": "Utilizzare un'e-mail alternativa", "Important:": "Importante:", "For security reasons, a recovery email is required.": "Per motivi di sicurezza è necessaria un'e-mail di recupero.", @@ -78,6 +78,9 @@ "A server-side error occurred while processing your request! Please try again later.": "Si è verificato un errore lato server nel processare la tua richiesta! Ritenta più tardi.", "An error occurred while creating your account!": "Si è verificato un errore nella creazione dell'account!", "Username is too large.": "Il nome utente è troppo grande.", + "Username is too small.": "Il nome utente è troppo breve.", + "Password is too large.": "La password is too grande.", + "Password is too small.": "La password è troppo breve.", "Display name is too large.": "Il nome del display è troppo grande.", "Password has invalid characters.": "La password contiene caratteri non validi.", "I have read and accept the Terms of Service.": "Ho letto e accetto i Termini di servizio.", diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 379d2e0f..c0d110ac 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -181,9 +181,9 @@ class AccountController extends Controller { } $inputData = [ - 'username' => ['value' => $username, 'maxLength' => 30], - 'display name' => ['value' => $displayname, 'maxLength' => 30], - 'password' => ['value' => $password, 'maxLength' => 32], + 'username' => ['value' => $username, 'maxLength' => 30, 'minLength' => 3], + 'display name' => ['value' => $displayname, 'maxLength' => 30, 'minLength' => null], + 'password' => ['value' => $password, 'maxLength' => 128, 'minLength' => 12], ]; foreach ($inputData as $inputName => $inputInfo) { @@ -272,13 +272,16 @@ class AccountController extends Controller { * * @return string|null If validation fails, a string describing the error; otherwise, null. */ - private function validateInput(string $inputName, string $value, ?int $maxLength = null) : ?string { + private function validateInput(string $inputName, string $value, ?int $maxLength = null, ?int $minLength = null) : ?string { if ($value === '') { return ucfirst(strtolower($inputName))." is required."; } if ($maxLength !== null && strlen($value) > $maxLength) { return ucfirst(strtolower($inputName))." is too large."; } + if ($minLength !== null && strlen($value) < $minLength) { + return ucfirst(strtolower($inputName))." is too small."; + } return null; // Validation passed } @@ -315,7 +318,7 @@ class AccountController extends Controller { ]; foreach ($inputData as $inputName => $inputInfo) { - $validationError = $this->validateInput($inputName, $inputInfo['value'], $inputInfo['maxLength']); + $validationError = $this->validateInput($inputName, $inputInfo['value'], $inputInfo['maxLength'], $inputInfo['minLength']); if ($validationError !== null) { $response->setData(['message' => $validationError, 'field' => $inputName, 'success' => false]); $response->setStatus(400); diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 51db07a1..8fd90aa8 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -236,7 +236,7 @@ export default { ], passwordErrors: [], passwordRules: [ - { message: t(this.appName, 'Incorrect password length: Required length is 8 to 32'), regex: /.{8,32}/ }, + { message: t(this.appName, 'Incorrect password length: Required length is 12 to 128'), regex: /.{12,128}/ }, { message: t(this.appName, 'Password has invalid characters.'), regex: /^(?!.*\\).*/ }, ], isUsernameAvailable: false, -- GitLab From 542db140c412520b701f1a818f256b39b76b2885 Mon Sep 17 00:00:00 2001 From: Akhil Date: Thu, 7 May 2026 16:45:54 +0530 Subject: [PATCH 02/13] fix: also fix length check at pwdv1challenge class --- src/passwords/PWDv1Challenge.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/passwords/PWDv1Challenge.js b/src/passwords/PWDv1Challenge.js index 72cca72d..a437aad1 100644 --- a/src/passwords/PWDv1Challenge.js +++ b/src/passwords/PWDv1Challenge.js @@ -12,8 +12,8 @@ export default class PWDv1Challenge extends BasePWDv1Challenge { } _validatePasswordLength() { - if (this._password.length < 8) throw new Error('Password is too short') - if (this._password.length > 128) throw new Error('Password is too long') + if (this._password.length < 12) throw new Error('Password is too small.') + if (this._password.length > 128) throw new Error('Password is too large.') } solve() { -- GitLab From 6d34a39c0ea47e318a08571ba1a79d3135ab019f Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 16:30:22 +0530 Subject: [PATCH 03/13] fix: regex to check length should check full string --- src/signup/RegistrationForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 8fd90aa8..eadf4ccf 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -236,7 +236,7 @@ export default { ], passwordErrors: [], passwordRules: [ - { message: t(this.appName, 'Incorrect password length: Required length is 12 to 128'), regex: /.{12,128}/ }, + { message: t(this.appName, 'Incorrect password length: Required length is 12 to 128'), regex: /^.{12,128}$/ }, { message: t(this.appName, 'Password has invalid characters.'), regex: /^(?!.*\\).*/ }, ], isUsernameAvailable: false, -- GitLab From 87013936792c71ecf68ca773c6997b61df5520bc Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 16:34:46 +0530 Subject: [PATCH 04/13] fix: password check in validateFields in backend --- lib/Controller/AccountController.php | 14 ++++++++++---- src/signup/RegistrationForm.vue | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index c0d110ac..e3b10c22 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -297,7 +297,7 @@ class AccountController extends Controller { * * @return \OCP\AppFramework\Http\DataResponse */ - public function validateFields(string $username, string $displayname) : DataResponse { + public function validateFields(string $username, string $displayname, string $password) : DataResponse { $this->session->remove(self::SESSION_VERIFIED_DISPLAYNAME); $this->session->remove(self::SESSION_VERIFIED_USERNAME); $response = new DataResponse(); @@ -312,11 +312,17 @@ class AccountController extends Controller { return $response; } + if (empty($password)) { + $response->setData(['message' => 'Password is required.', 'field' => 'display name', 'success' => false]); + return $response; + } + $inputData = [ - 'username' => ['value' => $username, 'maxLength' => 30], - 'display name' => ['value' => $displayname, 'maxLength' => 30] + 'username' => ['value' => $username, 'maxLength' => 30, 'minLength' => 3], + 'display name' => ['value' => $displayname, 'maxLength' => 30, 'minLength' => null], + 'password' => ['value' => $password, 'maxLength' => 128, 'minLength' => 12], ]; - + foreach ($inputData as $inputName => $inputInfo) { $validationError = $this->validateInput($inputName, $inputInfo['value'], $inputInfo['maxLength'], $inputInfo['minLength']); if ($validationError !== null) { diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index eadf4ccf..b98a9f10 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -314,6 +314,7 @@ export default { const data = { username: this.formData.username, displayname: this.formData.displayname, + password: this.formData.password, } const url = generateUrl(`/apps/${this.appName}/accounts/validate_fields`) -- GitLab From b7e2ad3371fa3970b2018c3893180f73724f1b84 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 16:44:58 +0530 Subject: [PATCH 05/13] fix: use result of validate_fields for password too --- src/signup/RegistrationForm.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index b98a9f10..773f5502 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -319,6 +319,9 @@ export default { const url = generateUrl(`/apps/${this.appName}/accounts/validate_fields`) try { + this.usernameValidationMessage = '' + this.displaynameValidationMessage = '' + this.passwordErrors = [] await Axios.post(url, data) this.isUsernameAvailable = true } catch (error) { @@ -331,6 +334,10 @@ export default { this.validation.isDisplaynameNotValid = true this.displaynameValidationMessage = t(this.appName, error.response.data.message) } + if (error.response.data.field === 'password') { + this.validation.isPasswordNotValid = true + this.passwordErrors.push(t(this.appName, error.response.data.message)) + } } else { this.validation.isUsernameNotValid = true this.usernameValidationMessage = t(this.appName, 'Something went wrong.') -- GitLab From 13d038ff75b94e244d4b4be7abf039a69dac6666 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 11:21:10 +0000 Subject: [PATCH 06/13] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Aude M --- l10n/it.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/l10n/it.json b/l10n/it.json index 525183f8..270d4010 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -77,11 +77,11 @@ "Captcha is not verified!": "Il Captcha non è verificato!", "A server-side error occurred while processing your request! Please try again later.": "Si è verificato un errore lato server nel processare la tua richiesta! Ritenta più tardi.", "An error occurred while creating your account!": "Si è verificato un errore nella creazione dell'account!", - "Username is too large.": "Il nome utente è troppo grande.", - "Username is too small.": "Il nome utente è troppo breve.", - "Password is too large.": "La password is too grande.", - "Password is too small.": "La password è troppo breve.", - "Display name is too large.": "Il nome del display è troppo grande.", + "Username is too long.": "Il nome utente è troppo lungo.", + "Username is too short.": "Il nome utente è troppo corto.", + "Password is too long.": "La password è troppo lunga.", + "Password is too short.": "La password è troppo corta.", + "Display name is too long.": "Il nome visualizzato è troppo lungo.", "Password has invalid characters.": "La password contiene caratteri non validi.", "I have read and accept the Terms of Service.": "Ho letto e accetto i Termini di servizio.", "I want to stay informed about Murena for business offers.": "Desidero ricevere informazioni sulle offerte commerciali di Murena.", -- GitLab From ea183acb37f36b904a294eb3eac935b292c40954 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 11:21:16 +0000 Subject: [PATCH 07/13] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Aude M --- l10n/fr.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/l10n/fr.json b/l10n/fr.json index 96712c39..53db31dc 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -81,11 +81,11 @@ "Captcha is not verified!": "Captcha n'est pas vérifié !", "A server-side error occurred while processing your request! Please try again later.": "Erreur du serveur dans la gestion de votre demande ! Merci d'essayer ultérieurement.", "An error occurred while creating your account!": "Une erreur s'est produite lors de la création de votre compte!", - "Username is too large.": "Le nom d'utilisateur est trop grand.", - "Username is too small.": "Le nom d'utilisateur est trop court.", - "Password is too large.": "Le mot de passe est trop grand.", - "Password is too small.": "Le mot de passe est trop court.", - "Display name is too large.": "Le nom affiché est trop grand.", + "Username is too long.": "Le nom d'utilisateur est trop long.", + "Username is too short.": "Le nom d'utilisateur est trop court.", + "Password is too long.": "Le mot de passe est trop long.", + "Password is too short.": "Le mot de passe est trop court.", + "Display name is too long.": "Le nom affiché est trop long.", "Password has invalid characters.": "Le mot de passe contient des caractères non valides.", "I want to stay informed about Murena for business offers.": "Je souhaite rester informé·e des offres Murena pour les entreprises.", "Your browser does not support the required encryption. Please use an up-to-date browser to continue.": "Votre navigateur ne prend pas en charge le chiffrement requis. Veuillez utiliser un navigateur à jour pour continuer." -- GitLab From 03cd37adc5e4cbf6697c51a19c68f8d219fc0830 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 11:21:19 +0000 Subject: [PATCH 08/13] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Aude M --- l10n/de.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/l10n/de.json b/l10n/de.json index 76e077df..ac1e09a5 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -79,10 +79,10 @@ "Captcha is not verified!": "Captcha wird nicht überprüft!", "A server-side error occurred while processing your request! Please try again later.": "Ein serverseitiger Fehler ist bei der Bearbeitung Ihrer Anfrage aufgetreten! Bitte versuchen Sie es später noch einmal.", "An error occurred while creating your account!": "Beim Anlegen Ihres Kontos ist ein Fehler aufgetreten!", - "Username is too large.": "Der Benutzername ist zu groß.", - "Username is too small.": "Der Benutzername ist zu kurz.", - "Password is too large.": "Das Passwort ist zu groß.", - "Password is too small.": "Das Passwort ist zu kurz.", + "Username is too long.": "Der Benutzername ist zu lang." + "Username is too short.": "Der Benutzername ist zu kurz.", + "Password is too long.": "Das Passwort ist zu lang.", + "Password is too short.": "Das Passwort ist zu kurz.", "Display name is too large.": "Der Anzeigename ist zu groß.", "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten.", -- GitLab From d292f8f75d9b5c722e9c2d0b980887a3e2521042 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 11:21:22 +0000 Subject: [PATCH 09/13] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Aude M --- l10n/de_DE.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/l10n/de_DE.json b/l10n/de_DE.json index a2abe450..a3d7b341 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -79,11 +79,11 @@ "Captcha is not verified!": "Captcha wird nicht überprüft!", "A server-side error occurred while processing your request! Please try again later.": "Ein serverseitiger Fehler ist bei der Bearbeitung Ihrer Anfrage aufgetreten! Bitte versuchen Sie es später noch einmal.", "An error occurred while creating your account!": "Beim Anlegen Ihres Kontos ist ein Fehler aufgetreten!", - "Username is too large.": "Der Benutzername ist zu groß.", - "Username is too small.": "Der Benutzername ist zu kurz.", - "Password is too large.": "Das Passwort ist zu groß.", - "Password is too small.": "Das Passwort ist zu kurz.", - "Display name is too large.": "Der Anzeigename ist zu groß.", + "Username is too long.": "Der Benutzername ist zu lang.", + "Username is too short.": "Der Benutzername ist zu kurz.", + "Password is too long.": "Das Passwort ist zu lang.", + "Password is too short.": "Das Passwort ist zu kurz.", + "Display name is too long.": "Der Anzeigename ist zu lang.", "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten.", "Your browser does not support the required encryption. Please use an up-to-date browser to continue.": "Ihr Browser unterstützt die erforderliche Verschlüsselung nicht. Bitte aktualisieren Sie Ihren Browser, um fortzufahren." -- GitLab From 032b66be73023010bb20ae0a2c58f6c08de38c8f Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 11:21:25 +0000 Subject: [PATCH 10/13] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Aude M --- l10n/es.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/l10n/es.json b/l10n/es.json index 09960868..ffd4b4f2 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -82,11 +82,11 @@ "Captcha is not verified!": "¡Captcha no está verificado!", "A server-side error occurred while processing your request! Please try again later.": "Hubo un error en el servidor al procesar tu solicitud. Por favor, inténtalo más tarde.", "An error occurred while creating your account!": "¡Hubo un error creando tu cuenta!", - "Username is too large.": "El nombre de usuario es demasiado grande.", - "Username is too small.": "El nombre de usuario es demasiado corto.", - "Password is too large.": "La contraseña es demasiado grande.", - "Password is too small.": "La contraseña es demasiado corta.", - "Display name is too large.": "El nombre para mostrar es demasiado grande.", + "Username is too long.": "El nombre de usuario es demasiado largo.", + "Username is too short.": "El nombre de usuario es demasiado corto.", + "Password is too long.": "La contraseña es demasiado larga.", + "Password is too short.": "La contraseña es demasiado corta.", + "Display name is too long.": "El nombre para mostrar es demasiado largo.", "Password has invalid characters.": "Password has invalid characters.", "I want to stay informed about Murena for business offers.": "Deseo permanecer informado sobre las ofertas de Murena para empresas.", "Your browser does not support the required encryption. Please use an up-to-date browser to continue.": "Tu navegador no admite el cifrado requerido. Utiliza un navegador actualizado para continuar." -- GitLab From ea64ab710ee78883dde6dbfe4d154b0ce5477d82 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 11:21:28 +0000 Subject: [PATCH 11/13] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Aude M --- l10n/en.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/l10n/en.json b/l10n/en.json index ce707294..580b77b8 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -81,11 +81,11 @@ "Captcha is not verified!": "Captcha is not verified!", "A server-side error occurred while processing your request! Please try again later.": "A server-side error occurred while processing your request! Please try again later.", "An error occurred while creating your account!": "An error occurred while creating your account!", - "Username is too large.": "Username is too large.", - "Display name is too large.": "Display name is too large.", - "Username is too small.": "Username is too small.", - "Password is too large.": "Password is too large.", - "Password is too small.": "Password is too small.", + "Username is too long.": "Username is too long.", + "Display name is too long.": "Display name is too long.", + "Username is too short.": "Username is too short.", + "Password is too long.": "Password is too long.", + "Password is too short.": "Password is too short.", "Password has invalid characters.": "La contraseña tiene caracteres no válidos.", "I want to stay informed about Murena for business offers.": "I want to stay informed about Murena for business offers.", "Your browser does not support the required encryption. Please use an up-to-date browser to continue.": "Your browser does not support the required encryption. Please use an up-to-date browser to continue." -- GitLab From 0a30963e21c1e89a19a6739ac44d1e2e7c59c8e3 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 11:21:31 +0000 Subject: [PATCH 12/13] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Aude M --- l10n/en.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/l10n/en.js b/l10n/en.js index 9c5da67a..53375967 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -84,11 +84,11 @@ OC.L10N.register( "Captcha is not verified!": "Captcha is not verified!", "A server-side error occurred while processing your request! Please try again later.": "A server-side error occurred while processing your request! Please try again later.", "An error occurred while creating your account!": "An error occurred while creating your account!", - "Username is too large.": "Username is too large.", - "Username is too small.": "Username is too small.", - "Password is too large.": "Password is too large.", - "Password is too small.": "Password is too small.", - "Display name is too large.": "Display name is too large.", + "Username is too long.": "Username is too long.", + "Username is too short.": "Username is too short.", + "Password is too long.": "Password is too long.", + "Password is too short.": "Password is too short.", + "Display name is too long.": "Display name is too long.", "Password has invalid characters.": "Password has invalid characters.", "I want to stay informed about Murena for business offers.": "I want to stay informed about Murena for business offers.", "Your browser does not support the required encryption. Please use an up-to-date browser to continue.": "Your browser does not support the required encryption. Please use an up-to-date browser to continue." -- GitLab From 8e6ec3d87276893dfc3e113d376062688f05b187 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 8 May 2026 11:50:09 +0000 Subject: [PATCH 13/13] Apply 1 suggestion(s) to 1 file(s) --- lib/Controller/AccountController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index e3b10c22..6300f791 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -313,7 +313,7 @@ class AccountController extends Controller { } if (empty($password)) { - $response->setData(['message' => 'Password is required.', 'field' => 'display name', 'success' => false]); + $response->setData(['message' => 'Password is required.', 'field' => 'password', 'success' => false]); return $response; } -- GitLab