diff --git a/appinfo/routes.php b/appinfo/routes.php index eeeec68a0d28bc10ea95abc3ba3981dd78e5ccfe..90b0f6f7dc545425dc526abda9d83bb6b85c4f74 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -30,6 +30,6 @@ return ['routes' => [ ['name' => 'account#create', 'url' => '/accounts/create', 'verb' => 'POST'], ['name' => 'account#captcha', 'url' => '/accounts/captcha', 'verb' => 'GET'], ['name' => 'account#verify_captcha', 'url' => '/accounts/verify_captcha', 'verb' => 'POST'], - ['name' => 'account#check_username_available', 'url' => '/accounts/check_username_available', 'verb' => 'POST'], + ['name' => 'account#validate_fields', 'url' => '/accounts/validate_fields', 'verb' => 'POST'], ]]; diff --git a/l10n/de.js b/l10n/de.js index cc5a45d0378a7b649ab5560c7e08870929f53f63..14a5579dcdfb1f3ee378450d2361d8ba5a14d547 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -59,7 +59,7 @@ OC.L10N.register( "Recovery Email": "Wiederherstellung E-Mail", "Display name is required.": "Anzeigename ist erforderlich.", "Username is required.": "Der Benutzername ist erforderlich.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen und Unterstrichen bestehen.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen, Punkten und Unterstrichen bestehen.", "Username must be at least 3 characters long.": "Der Benutzername muss mindestens 3 Zeichen lang sein.", "Username is already taken.": "Benutzername ist bereits vergeben.", "Password is required.": "Passwort ist erforderlich.", @@ -82,6 +82,8 @@ OC.L10N.register( "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn Sie eine Nachricht sehen, die besagt \"Google hasn't verified this app\", können Sie diese ignorieren, indem Sie auf \"Advanced\" klicken. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Nachricht zu entfernen." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn Sie eine Nachricht sehen, die besagt \"Google hasn't verified this app\", können Sie diese ignorieren, indem Sie auf \"Advanced\" klicken. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Nachricht zu entfernen.", + "Username is too large.": "Der Benutzername ist zu groß.", + "Display name is too large.": "Der Anzeigename ist zu groß." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index a026300f6fa2a70c3bbb357c0c841f86452879c0..c3dd2ba5ff01ce8ae08db480cfaac152e6337274 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -58,7 +58,7 @@ "Recovery Email": "Wiederherstellung E-Mail", "Display name is required.": "Anzeigename ist erforderlich.", "Username is required.": "Der Benutzername ist erforderlich.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen und Unterstrichen bestehen.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen, Punkten und Unterstrichen bestehen.", "Username must be at least 3 characters long.": "Der Benutzername muss mindestens 3 Zeichen lang sein.", "Username is already taken.": "Benutzername ist bereits vergeben.", "Password is required.": "Passwort ist erforderlich.", @@ -80,7 +80,9 @@ "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn Sie eine Nachricht sehen, die besagt \"Google hasn't verified this app\", können Sie diese ignorieren, indem Sie auf \"Advanced\" tippen. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Fehlermeldung zu beseitigen." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn Sie eine Nachricht sehen, die besagt \"Google hasn't verified this app\", können Sie diese ignorieren, indem Sie auf \"Advanced\" tippen. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Fehlermeldung zu beseitigen.", + "Username is too large.": "Der Benutzername ist zu groß.", + "Display name is too large.": "Der Anzeigename ist zu groß." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 4a2393cd610c14a865357343f86620abf678c39b..4754fe0ee8c1d3b5ebc2a9071a7f0a776ea5eb0c 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -59,7 +59,7 @@ OC.L10N.register( "Recovery Email": "Wiederherstellung E-Mail", "Display name is required.": "Anzeigename ist erforderlich.", "Username is required.": "Der Benutzername ist erforderlich.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen und Unterstrichen bestehen.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen, Punkten und Unterstrichen bestehen.", "Username must be at least 3 characters long.": "Der Benutzername muss mindestens 3 Zeichen lang sein.", "Username is already taken.": "Benutzername ist bereits vergeben.", "Password is required.": "Passwort ist erforderlich.", @@ -82,6 +82,8 @@ OC.L10N.register( "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn du eine Nachricht siehst, die besagt \"Google hasn't verified this app\", kannst du sie ignorieren, indem du auf \"Advanced\" klickst. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Nachricht zu entfernen." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn du eine Nachricht siehst, die besagt \"Google hasn't verified this app\", kannst du sie ignorieren, indem du auf \"Advanced\" klickst. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Nachricht zu entfernen.", + "Username is too large.": "Der Benutzername ist zu groß.", + "Display name is too large.": "Der Anzeigename ist zu groß." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index fffb2d9349abe3049b4f06009de845b0f7825f58..2f5263402c8d0126a2ce8fb51328244ce6335b14 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -58,7 +58,7 @@ "Recovery Email": "Wiederherstellung E-Mail", "Display name is required.": "Anzeigename ist erforderlich.", "Username is required.": "Der Benutzername ist erforderlich.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen und Unterstrichen bestehen.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Der Benutzername darf nur aus Buchstaben, Zahlen, Bindestrichen, Punkten und Unterstrichen bestehen.", "Username must be at least 3 characters long.": "Der Benutzername muss mindestens 3 Zeichen lang sein.", "Username is already taken.": "Benutzername ist bereits vergeben.", "Password is required.": "Passwort ist erforderlich.", @@ -80,7 +80,9 @@ "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn du eine Nachricht siehst, die besagt \"Google hasn't verified this app\", kannst du sie ignorieren, indem du auf \"Advanced\" tippst. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Fehlermeldung zu beseitigen." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn du eine Nachricht siehst, die besagt \"Google hasn't verified this app\", kannst du sie ignorieren, indem du auf \"Advanced\" tippst. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Fehlermeldung zu beseitigen.", + "Username is too large.": "Der Benutzername ist zu groß.", + "Display name is too large.": "Der Anzeigename ist zu groß." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/en.js b/l10n/en.js index 0532b2a7e424d6d5afcc61e6e7f87f27877546d0..d7c570dfc1a7bf9ceb55c4484b65b65a7d81bb7b 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -62,7 +62,7 @@ OC.L10N.register( "Recovery Email": "Recovery Email", "Display name is required.": "Display name is required.", "Username is required.": "Username is required.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Username must consist of letters, numbers, hyphens, and underscores only.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Username must consist of letters, numbers, hyphens, dots and underscores only.", "Username must be at least 3 characters long.": "Username must be at least 3 characters long.", "Username is already taken.": "Username is already taken.", "Password is required.": "Password is required.", @@ -85,6 +85,8 @@ 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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.", + "Username is too large.": "Username is too large.", + "Display name is too large.": "Display name is too large." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index 9fd48d10d798eb39785d21f3ba62d54085b902a3..7568e3f85967e1ca2358d2db9a97a5547bee7d69 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -59,7 +59,7 @@ "Recovery Email": "Recovery Email", "Display name is required.": "Display name is required.", "Username is required.": "Username is required.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Username must consist of letters, numbers, hyphens, and underscores only.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Username must consist of letters, numbers, hyphens, dots and underscores only.", "Username must be at least 3 characters long.": "Username must be at least 3 characters long.", "Username is already taken.": "Username is already taken.", "Password is required.": "Password is required.", @@ -82,7 +82,9 @@ "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.", + "Username is too large.": "Username is too large.", + "Display name is too large.": "Display name is too large." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/es.js b/l10n/es.js index b287c5fd0504c4ea2bd114feaad1547a1936a138..c97769b97a1f47a5cd3a221bfed2fc69c37ba316 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -61,7 +61,7 @@ OC.L10N.register( "Recovery Email": "Correo electrónico de recuperación", "Display name is required.": "El nombre para mostrar es obligatorio.", "Username is required.": "Nombre de usuario obligatorio.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "El nombre de usuario debe estar compuesto únicamente por letras, números, guiones y guiones bajos.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "El nombre de usuario debe estar compuesto únicamente por letras, números, guiones, puntos y guiones bajos.", "Username must be at least 3 characters long.": "El nombre de usuario debe tener al menos 3 caracteres.", "Username is already taken.": "El nombre de usuario ya está ocupado.", "Password is required.": "Se requiere contraseña.", @@ -84,6 +84,8 @@ OC.L10N.register( "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si ves un mensaje que dice \"Google hasn't verified this app\", puedes omitirlo haciendo clic en \"Advanced\". Actualmente estamos trabajando para obtener la certificación que Google exige para eliminar este mensaje." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si ves un mensaje que dice \"Google hasn't verified this app\", puedes omitirlo haciendo clic en \"Advanced\". Actualmente estamos trabajando para obtener la certificación que Google exige para eliminar este mensaje.", + "Username is too large.": "El nombre de usuario es demasiado grande.", + "Display name is too large.": "El nombre para mostrar es demasiado grande." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 38fed6a946ba0af2148bf595c49ead688d96a840..fd22c863c695bbca7f257aed306defb6d254a9df 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -60,7 +60,7 @@ "Recovery Email": "Correo electrónico de recuperación", "Display name is required.": "El nombre para mostrar es obligatorio.", "Username is required.": "Nombre de usuario obligatorio.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "El nombre de usuario debe estar compuesto únicamente por letras, números, guiones y guiones bajos.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "El nombre de usuario debe estar compuesto únicamente por letras, números, guiones, puntos y guiones bajos.", "Username must be at least 3 characters long.": "El nombre de usuario debe tener al menos 3 caracteres.", "Username is already taken.": "El nombre de usuario ya está ocupado.", "Password is required.": "Se requiere contraseña.", @@ -83,7 +83,9 @@ "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si ves un mensaje que dice \"Google hasn't verified this app\", puedes omitirlo haciendo clic en \"Advanced\". Actualmente estamos trabajando para obtener la certificación que Google exige para eliminar este mensaje." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si ves un mensaje que dice \"Google hasn't verified this app\", puedes omitirlo haciendo clic en \"Advanced\". Actualmente estamos trabajando para obtener la certificación que Google exige para eliminar este mensaje.", + "Username is too large.": "El nombre de usuario es demasiado grande.", + "Display name is too large.": "El nombre para mostrar es demasiado grande." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/fr.js b/l10n/fr.js index 78c2c1b4c8ff62faaa950a6be4f62fe6e92cc0d2..5a84aea7900fd04dcb7a38b93e8234b1bbee1478 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -60,7 +60,7 @@ OC.L10N.register( "Recovery Email": "Récupération de l'email", "Display name is required.": "Le nom d'affichage est obligatoire.", "Username is required.": "Le nom d'utilisateur est requis.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Le nom d'utilisateur doit être composé uniquement de lettres, de chiffres, de traits d'union et de traits de soulignement.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Le nom d'utilisateur doit être composé uniquement de lettres, de chiffres, de traits d'union, de points et de traits de soulignement.", "Username must be at least 3 characters long.": "Le nom d'utilisateur doit comporter au moins 3 caractères.", "Username is already taken.": "Le nom d'utilisateur est déjà pris.", "Password is required.": "Le mot de passe est requis.", @@ -83,6 +83,8 @@ OC.L10N.register( "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si vous voyez un message disant \"Google hasn't verified this app\" vous pouvez le contourner en cliquant sur \"Advanced\". Nous travaillons actuellement sur l'obtention de la certification exigée par Google pour se débarrasser de ce message." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si vous voyez un message disant \"Google hasn't verified this app\" vous pouvez le contourner en cliquant sur \"Advanced\". Nous travaillons actuellement sur l'obtention de la certification exigée par Google pour se débarrasser de ce message.", + "Username is too large.": "Le nom d'utilisateur est trop grand.", + "Display name is too large.": "Le nom affiché est trop grand." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 4e9a17d4d2f699d438f5198adb233d7ddd6fda75..2b733b05ac02429d3305601883c281e30f8526b5 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -59,7 +59,7 @@ "Recovery Email": "Récupération de l'email", "Display name is required.": "Le nom d'affichage est obligatoire.", "Username is required.": "Le nom d'utilisateur est requis.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Le nom d'utilisateur doit être composé uniquement de lettres, de chiffres, de traits d'union et de traits de soulignement.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Le nom d'utilisateur doit être composé uniquement de lettres, de chiffres, de traits d'union, de points et de traits de soulignement.", "Username must be at least 3 characters long.": "Le nom d'utilisateur doit comporter au moins 3 caractères.", "Username is already taken.": "Le nom d'utilisateur est déjà pris.", "Password is required.": "Le mot de passe est requis.", @@ -82,7 +82,9 @@ "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si vous voyez un message disant \"Google hasn't verified this app\" vous pouvez le contourner en cliquant sur \"Advanced\". Nous travaillons actuellement sur l'obtention de la certification exigée par Google pour se débarrasser de ce message." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si vous voyez un message disant \"Google hasn't verified this app\" vous pouvez le contourner en cliquant sur \"Advanced\". Nous travaillons actuellement sur l'obtention de la certification exigée par Google pour se débarrasser de ce message.", + "Username is too large.": "Le nom d'utilisateur est trop grand.", + "Display name is too large.": "Le nom affiché est trop grand." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index e9f75b0550a7a19938519d2684495272b4d52248..cbf1181e9f3ac02abdb1037aec1a541b30fabd13 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -60,7 +60,7 @@ OC.L10N.register( "Recovery Email": "Recupero e-mail", "Display name is required.": "Il nome visualizzato è obbligatorio.", "Username is required.": "Il nome utente è necessario.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Il nome utente deve essere composto esclusivamente da lettere, numeri, trattini e trattini bassi.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Il nome utente deve essere composto esclusivamente da lettere, numeri, trattini, punti e trattini bassi.", "Username must be at least 3 characters long.": "Il nome utente deve essere lungo almeno 3 caratteri.", "Username is already taken.": "Il nome utente è già stato preso.", "Password is required.": "La password è necessaria.", @@ -83,6 +83,8 @@ OC.L10N.register( "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Se vedi un messaggio che dice \"Google hasn't verified this app\", puoi ignorarlo facendo clic su \"Advanced\". Attualmente stiamo lavorando per ottenere la certificazione richiesta da Google per eliminare questo messaggio." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Se vedi un messaggio che dice \"Google hasn't verified this app\", puoi ignorarlo facendo clic su \"Advanced\". Attualmente stiamo lavorando per ottenere la certificazione richiesta da Google per eliminare questo messaggio.", + "Username is too large.": "Il nome utente è troppo grande.", + "Display name is too large.": "Il nome del display è troppo grande." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/it.json b/l10n/it.json index 9e9d9d1a862c325fba2506aacdbcaa0375ad37db..18307c2bee195efe88edb3b2c07902ee9e629c0a 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -59,7 +59,7 @@ "Recovery Email": "Recupero e-mail", "Display name is required.": "Il nome visualizzato è obbligatorio.", "Username is required.": "Il nome utente è necessario.", - "Username must consist of letters, numbers, hyphens, and underscores only.": "Il nome utente deve essere composto esclusivamente da lettere, numeri, trattini e trattini bassi.", + "Username must consist of letters, numbers, hyphens, dots and underscores only.": "Il nome utente deve essere composto esclusivamente da lettere, numeri, trattini, punti e trattini bassi.", "Username must be at least 3 characters long.": "Il nome utente deve essere lungo almeno 3 caratteri.", "Username is already taken.": "Il nome utente è già stato preso.", "Password is required.": "La password è necessaria.", @@ -78,7 +78,9 @@ "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!", - "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Se vedi un messaggio che dice \"Google hasn't verified this app\", puoi ignorarlo cliccando su \"Advanced\". Attualmente stiamo lavorando per ottenere la certificazione richiesta da Google per eliminare questo messaggio." + "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Se vedi un messaggio che dice \"Google hasn't verified this app\", puoi ignorarlo cliccando su \"Advanced\". Attualmente stiamo lavorando per ottenere la certificazione richiesta da Google per eliminare questo messaggio.", + "Username is too large.": "Il nome utente è troppo grande.", + "Display name is too large.": "Il nome del display è troppo grande." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index b6aab24169abc9856842ffd528e1ea664807a44f..550e1a7dd5bc0aa22390bf7f3275a4b2f8692674 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -156,7 +156,7 @@ class AccountController extends Controller { $inputData = [ 'username' => ['value' => $username, 'maxLength' => 30], - 'displayname' => ['value' => $displayname, 'maxLength' => 30], + 'display name' => ['value' => $displayname, 'maxLength' => 30], 'password' => ['value' => $password, 'maxLength' => 1024], ]; @@ -227,40 +227,65 @@ class AccountController extends Controller { */ private function validateInput(string $inputName, string $value, ?int $maxLength = null) : ?string { if ($value === '') { - return "$inputName is required."; + return ucfirst(strtolower($inputName))." is required."; } - if ($maxLength !== null && strlen($value) > $maxLength) { - return "$inputName is too large."; + return ucfirst(strtolower($inputName))." is too large."; } return null; // Validation passed } /** - * Check if a username is available. + * Check if a username and displayname is valid or not. * * @NoAdminRequired * @PublicPage * @NoCSRFRequired * * @param string $username The username to check. + * @param string $displayname The displayname to check. * * @return \OCP\AppFramework\Http\DataResponse */ - public function checkUsernameAvailable(string $username) : DataResponse { + public function validateFields(string $username, string $displayname) : DataResponse { $this->session->remove(self::SESSION_USERNAME_CHECK); $response = new DataResponse(); $response->setStatus(400); if (empty($username)) { + $response->setData(['message' => 'Username is required.', 'field' => 'username', 'success' => false]); + return $response; + } + if (empty($displayname)) { + $response->setData(['message' => 'Display name is required.', 'field' => 'display name', 'success' => false]); return $response; } + $inputData = [ + 'username' => ['value' => $username, 'maxLength' => 30], + 'display name' => ['value' => $displayname, 'maxLength' => 30] + ]; + + foreach ($inputData as $inputName => $inputInfo) { + $validationError = $this->validateInput($inputName, $inputInfo['value'], $inputInfo['maxLength']); + if ($validationError !== null) { + $response->setData(['message' => $validationError, 'field' => $inputName, 'success' => false]); + $response->setStatus(400); + return $response; + } + } + if (!preg_match('/^[a-zA-Z0-9._-]+$/', $username)) { + $response->setData(['message' => 'Username must consist of letters, numbers, hyphens, dots and underscores only.', 'field' => 'username', 'success' => false]); + $response->setStatus(403); + return $response; + } try { $username = mb_strtolower($username, 'UTF-8'); if (!$this->userService->userExists($username) && !$this->userService->isUsernameTaken($username)) { $response->setStatus(200); $this->session->set(self::SESSION_USERNAME_CHECK, true); + } else { + $response->setData(['message' => 'Username is already taken.', 'field' => 'username', 'success' => false]); } } catch (Exception $e) { $this->logger->logException($e, ['app' => Application::APP_ID ]); diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 34d853424d4ce76d688af8b176fa420426e56533..7ae385ab745b188901ce25a7fc7dbb57a38abca5 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -27,6 +27,9 @@
{{ t(appName,'Display name is required.') }}
++ {{ t(appName, displaynameValidationMessage) }} +
@@ -182,6 +185,7 @@ export default { return { appName: APPLICATION_NAME, usernameValidationMessage: '', + displaynameValidationMessage: '', domain: window.location.host, validation: { isDisplaynameEmpty: false, @@ -192,6 +196,7 @@ export default { isRepasswordEmpty: false, isRePasswordMatched: false, isAccepttnsEmpty: false, + isDisplaynameNotValid: false, }, languages: [ { code: 'en', name: 'English' }, @@ -259,13 +264,13 @@ export default { this.validation.isUsernameNotValid = false this.usernameValidationMessage = '' this.isUsernameAvailable = false - const usernamePattern = /^[a-zA-Z0-9_-]+$/ + const usernamePattern = /^[a-zA-Z0-9._-]+$/ const minCharacterCount = 3 const isValidUsername = usernamePattern.test(this.formData.username) const isEnoughCharacters = this.formData.username.length >= minCharacterCount if (!isValidUsername) { - this.usernameValidationMessage = t(this.appName, 'Username must consist of letters, numbers, hyphens, and underscores only.') + this.usernameValidationMessage = t(this.appName, 'Username must consist of letters, numbers, hyphens, dots and underscores only.') this.validation.isUsernameNotValid = true } else if (!isEnoughCharacters) { this.usernameValidationMessage = t(this.appName, 'Username must be at least 3 characters long.') @@ -273,20 +278,30 @@ export default { } }, - async checkUsername() { + async validateFields() { + this.validation.isUsernameNotValid = false + this.validation.isDisplaynameNotValid = false const data = { username: this.formData.username, + displayname: this.formData.displayname, } - const url = generateUrl(`/apps/${this.appName}/accounts/check_username_available`) + const url = generateUrl(`/apps/${this.appName}/accounts/validate_fields`) try { await Axios.post(url, data) this.isUsernameAvailable = true } catch (error) { - this.validation.isUsernameNotValid = true if (error.response && error.response.status === 400) { - this.usernameValidationMessage = t(this.appName, 'Username is already taken.') + if (error.response.data.field === 'username') { + this.validation.isUsernameNotValid = true + this.usernameValidationMessage = t(this.appName, error.response.data.message) + } + if (error.response.data.field === 'display name') { + this.validation.isDisplaynameNotValid = true + this.displaynameValidationMessage = t(this.appName, error.response.data.message) + } } else { + this.validation.isUsernameNotValid = true this.usernameValidationMessage = t(this.appName, 'Something went wrong.') } } @@ -294,7 +309,7 @@ export default { async submitRegistrationForm() { this.processing = true this.validateForm(['displayname', 'username', 'password', 'repassword', 'termsandservices']) - await this.checkUsername() + await this.validateFields() const isFormValid = Object.values(this.validation).every(value => !value) if (isFormValid) {