Updated the regex for isAuthPath to reduce false positive hits (#1806)

* OUpdated the regex for isAuthPath to reduce false positive hits as described in issue #1704

* Updated the regex for isAuthPath to reduce false positive hits - Re-ran Linting
This commit is contained in:
Security-Chief-Odo 2023-07-04 10:13:04 -05:00 committed by GitHub
parent 26979b91c2
commit ba9389c15e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
export default function isAuthPath(pathname: string) {
return /^\/create_.*|inbox|settings|admin|reports|registration_applications/g.test(
return /^\/(create_.*?|inbox|settings|admin|reports|registration_applications)\b/g.test(
pathname
);
}