From 3f902da490581aafb494319876921f2884b0a3c1 Mon Sep 17 00:00:00 2001 From: zaelgohary Date: Mon, 11 Sep 2023 12:14:36 +0300 Subject: [PATCH 1/3] Fix password validation --- packages/playground/src/components/smtp_server.vue | 1 + packages/playground/src/weblets/profile_manager.vue | 1 + packages/playground/src/weblets/tf_caprover.vue | 1 + packages/playground/src/weblets/tf_funkwhale.vue | 1 + packages/playground/src/weblets/tf_kubernetes.vue | 1 + packages/playground/src/weblets/tf_owncloud.vue | 1 + packages/playground/src/weblets/tf_peertube.vue | 1 + packages/playground/src/weblets/tf_taiga.vue | 1 + packages/playground/src/weblets/tf_umbrel.vue | 1 + packages/playground/src/weblets/tf_wordpress.vue | 1 + 10 files changed, 10 insertions(+) diff --git a/packages/playground/src/components/smtp_server.vue b/packages/playground/src/components/smtp_server.vue index 70a3648858..f355d34724 100644 --- a/packages/playground/src/components/smtp_server.vue +++ b/packages/playground/src/components/smtp_server.vue @@ -40,6 +40,7 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/profile_manager.vue b/packages/playground/src/weblets/profile_manager.vue index 399e21aee1..4d1120d8f4 100644 --- a/packages/playground/src/weblets/profile_manager.vue +++ b/packages/playground/src/weblets/profile_manager.vue @@ -185,6 +185,7 @@ :rules="[ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), validatePassword, ]" #="{ props: validationProps }" diff --git a/packages/playground/src/weblets/tf_caprover.vue b/packages/playground/src/weblets/tf_caprover.vue index cd2d907502..4326018931 100644 --- a/packages/playground/src/weblets/tf_caprover.vue +++ b/packages/playground/src/weblets/tf_caprover.vue @@ -65,6 +65,7 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), ]" #="{ props: validationProps }" > diff --git a/packages/playground/src/weblets/tf_funkwhale.vue b/packages/playground/src/weblets/tf_funkwhale.vue index 7177f71d5d..17ecf805dc 100644 --- a/packages/playground/src/weblets/tf_funkwhale.vue +++ b/packages/playground/src/weblets/tf_funkwhale.vue @@ -71,6 +71,7 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_kubernetes.vue b/packages/playground/src/weblets/tf_kubernetes.vue index dbb8f3242c..f760ec46c3 100644 --- a/packages/playground/src/weblets/tf_kubernetes.vue +++ b/packages/playground/src/weblets/tf_kubernetes.vue @@ -44,6 +44,7 @@ validators.required('Token is required.'), validators.minLength('Token minimum length is 6 chars.', 6), validators.maxLength('Token max length is 15 chars.', 15), + validators.isAlphanumeric('Token should consist of letters and numbers only.'), ]" #="{ props: validationProps }" > diff --git a/packages/playground/src/weblets/tf_owncloud.vue b/packages/playground/src/weblets/tf_owncloud.vue index 4d10cfaa31..6a869b96ab 100644 --- a/packages/playground/src/weblets/tf_owncloud.vue +++ b/packages/playground/src/weblets/tf_owncloud.vue @@ -60,6 +60,7 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_peertube.vue b/packages/playground/src/weblets/tf_peertube.vue index d08e55257b..1a5f3f1c46 100644 --- a/packages/playground/src/weblets/tf_peertube.vue +++ b/packages/playground/src/weblets/tf_peertube.vue @@ -48,6 +48,7 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_taiga.vue b/packages/playground/src/weblets/tf_taiga.vue index 0d8181390f..9cdfb7fbce 100644 --- a/packages/playground/src/weblets/tf_taiga.vue +++ b/packages/playground/src/weblets/tf_taiga.vue @@ -59,6 +59,7 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_umbrel.vue b/packages/playground/src/weblets/tf_umbrel.vue index 8f2c9d8ab6..39b59581b0 100644 --- a/packages/playground/src/weblets/tf_umbrel.vue +++ b/packages/playground/src/weblets/tf_umbrel.vue @@ -53,6 +53,7 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_wordpress.vue b/packages/playground/src/weblets/tf_wordpress.vue index 3211462978..0811ae2a5b 100644 --- a/packages/playground/src/weblets/tf_wordpress.vue +++ b/packages/playground/src/weblets/tf_wordpress.vue @@ -53,6 +53,7 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), + validators.isAlphanumeric('Password should consist of letters and numbers only.'), ]" #="{ props: validatorProps }" > From e17cf933619b08efc6fb50213c375b6d825fe7f9 Mon Sep 17 00:00:00 2001 From: zaelgohary Date: Mon, 11 Sep 2023 15:03:44 +0300 Subject: [PATCH 2/3] Edit password validation --- packages/playground/src/components/smtp_server.vue | 4 +++- packages/playground/src/weblets/profile_manager.vue | 4 +++- packages/playground/src/weblets/tf_caprover.vue | 4 +++- packages/playground/src/weblets/tf_funkwhale.vue | 4 +++- packages/playground/src/weblets/tf_kubernetes.vue | 4 +++- packages/playground/src/weblets/tf_owncloud.vue | 4 +++- packages/playground/src/weblets/tf_peertube.vue | 4 +++- packages/playground/src/weblets/tf_taiga.vue | 4 +++- packages/playground/src/weblets/tf_umbrel.vue | 4 +++- packages/playground/src/weblets/tf_wordpress.vue | 4 +++- 10 files changed, 30 insertions(+), 10 deletions(-) diff --git a/packages/playground/src/components/smtp_server.vue b/packages/playground/src/components/smtp_server.vue index f355d34724..5eb3977e61 100644 --- a/packages/playground/src/components/smtp_server.vue +++ b/packages/playground/src/components/smtp_server.vue @@ -40,7 +40,9 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/profile_manager.vue b/packages/playground/src/weblets/profile_manager.vue index 4d1120d8f4..15029c2c14 100644 --- a/packages/playground/src/weblets/profile_manager.vue +++ b/packages/playground/src/weblets/profile_manager.vue @@ -185,7 +185,9 @@ :rules="[ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), validatePassword, ]" #="{ props: validationProps }" diff --git a/packages/playground/src/weblets/tf_caprover.vue b/packages/playground/src/weblets/tf_caprover.vue index 4326018931..6c31581406 100644 --- a/packages/playground/src/weblets/tf_caprover.vue +++ b/packages/playground/src/weblets/tf_caprover.vue @@ -65,7 +65,9 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validationProps }" > diff --git a/packages/playground/src/weblets/tf_funkwhale.vue b/packages/playground/src/weblets/tf_funkwhale.vue index 17ecf805dc..01460b76e7 100644 --- a/packages/playground/src/weblets/tf_funkwhale.vue +++ b/packages/playground/src/weblets/tf_funkwhale.vue @@ -71,7 +71,9 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_kubernetes.vue b/packages/playground/src/weblets/tf_kubernetes.vue index f760ec46c3..ee5255d0be 100644 --- a/packages/playground/src/weblets/tf_kubernetes.vue +++ b/packages/playground/src/weblets/tf_kubernetes.vue @@ -44,7 +44,9 @@ validators.required('Token is required.'), validators.minLength('Token minimum length is 6 chars.', 6), validators.maxLength('Token max length is 15 chars.', 15), - validators.isAlphanumeric('Token should consist of letters and numbers only.'), + validators.pattern('Token should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validationProps }" > diff --git a/packages/playground/src/weblets/tf_owncloud.vue b/packages/playground/src/weblets/tf_owncloud.vue index 6a869b96ab..22e3ffafef 100644 --- a/packages/playground/src/weblets/tf_owncloud.vue +++ b/packages/playground/src/weblets/tf_owncloud.vue @@ -60,7 +60,9 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_peertube.vue b/packages/playground/src/weblets/tf_peertube.vue index 1a5f3f1c46..032ad357f9 100644 --- a/packages/playground/src/weblets/tf_peertube.vue +++ b/packages/playground/src/weblets/tf_peertube.vue @@ -48,7 +48,9 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_taiga.vue b/packages/playground/src/weblets/tf_taiga.vue index 9cdfb7fbce..7990134da4 100644 --- a/packages/playground/src/weblets/tf_taiga.vue +++ b/packages/playground/src/weblets/tf_taiga.vue @@ -59,7 +59,9 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_umbrel.vue b/packages/playground/src/weblets/tf_umbrel.vue index 39b59581b0..dad7712da1 100644 --- a/packages/playground/src/weblets/tf_umbrel.vue +++ b/packages/playground/src/weblets/tf_umbrel.vue @@ -53,7 +53,9 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validatorProps }" > diff --git a/packages/playground/src/weblets/tf_wordpress.vue b/packages/playground/src/weblets/tf_wordpress.vue index 0811ae2a5b..b3cc16ac71 100644 --- a/packages/playground/src/weblets/tf_wordpress.vue +++ b/packages/playground/src/weblets/tf_wordpress.vue @@ -53,7 +53,9 @@ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), validators.maxLength('Password cannot exceed 15 characters.', 15), - validators.isAlphanumeric('Password should consist of letters and numbers only.'), + validators.pattern('Password should not contain whitespaces.', { + pattern: /^[^\s]+$/, + }), ]" #="{ props: validatorProps }" > From b9f77dcf572b54b68829e35180cf35a615b836d6 Mon Sep 17 00:00:00 2001 From: zaelgohary Date: Mon, 11 Sep 2023 16:34:19 +0300 Subject: [PATCH 3/3] Revert profile manager changes --- packages/playground/src/weblets/profile_manager.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/playground/src/weblets/profile_manager.vue b/packages/playground/src/weblets/profile_manager.vue index 15029c2c14..399e21aee1 100644 --- a/packages/playground/src/weblets/profile_manager.vue +++ b/packages/playground/src/weblets/profile_manager.vue @@ -185,9 +185,6 @@ :rules="[ validators.required('Password is required.'), validators.minLength('Password must be at least 6 characters.', 6), - validators.pattern('Password should not contain whitespaces.', { - pattern: /^[^\s]+$/, - }), validatePassword, ]" #="{ props: validationProps }"