Skip to content

Commit da00ce1

Browse files
author
Artem
authored
Merge pull request #2742 from RedisInsight/fe/bugfix/RI-5046-fix-regex-vulnarability
escape "-" symbol to avoid regex range
2 parents 15e5b8a + 9a90d93 commit da00ce1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redisinsight/ui/src/utils/validations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const errorValidateNegativeInteger = (value: string) => {
111111
}
112112

113113
export const validateCertName = (initValue: string) =>
114-
initValue.replace(/[^ a-zA-Z0-9!@#$%^&*-_()[\]]+/gi, '').toString()
114+
initValue.replace(/[^ a-zA-Z0-9!@#$%^&*\-_()[\]]+/gi, '').toString()
115115

116116
export const isRequiredStringsValid = (...params: string[]) => params.every((p = '') => p.length > 0)
117117

0 commit comments

Comments
 (0)