Skip to content

Commit cda84a8

Browse files
author
PoeppingT
committed
Change validation for database password to ignore encrypted password.
1 parent 3a35224 commit cda84a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

client/web/src/settings/ApplicationComponent.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,10 @@ export function ApplicationComponent(props) {
233233
username: Yup.string()
234234
.matches('^[a-zA-Z]+[a-zA-Z0-9_$]*$', 'Username is not valid')
235235
.required('Username is required'),
236-
password: Yup.string()
237-
.matches('^[a-zA-Z0-9/@"\' ]{8,}$', 'Password must be longer than 8 characters and can only contain alphanumberic characters or / @ " \' and spaces')
238-
.required('Password is required'),
236+
password: Yup.string().when('hasEncryptedPassword', {
237+
is: false,
238+
then: Yup.string().matches('^[a-zA-Z0-9/@"\' ]{8,}$', 'Password must be longer than 8 characters and can only contain alphanumberic characters or / @ " \' and spaces')
239+
}).required('Password is required'),
239240
database: Yup.string(),
240241
}),
241242
otherwise: Yup.object(),

0 commit comments

Comments
 (0)