-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIN-4810 clear tenant mail address #985
base: develop
Are you sure you want to change the base?
Conversation
|
||
// Here I am removing strange characters or special symbols | ||
const sanitizedMail = removeExtraSpace | ||
.replace(/[^\w.@-_]/g, "") |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 17 hours ago
To fix the problem, we need to make the regular expression more precise by explicitly listing the characters we want to include instead of using a range that can match unintended characters. Specifically, we should replace the range @-_
with the exact characters we want to allow: @
, .
, -
, and _
.
- Update the regular expression on line 1899 to explicitly include the characters
@
,.
,-
, and_
instead of using the range@-_
. - This change will ensure that only the intended characters are matched, avoiding the inclusion of unintended characters.
-
Copy modified line R1899
@@ -1898,3 +1898,3 @@ | ||
const sanitizedMail = removeExtraSpace | ||
.replace(/[^\w.@-_]/g, "") | ||
.replace(/[^\w.@.\-_]/g, "") | ||
.replace(/\^/g, ""); |
No description provided.