Updated the regex for isAuthPath to reduce false positive hits (#1806)
authorSecurity-Chief-Odo <87156706+Security-Chief-Odo@users.noreply.github.com>
Tue, 4 Jul 2023 15:13:04 +0000 (10:13 -0500)
committerGitHub <noreply@github.com>
Tue, 4 Jul 2023 15:13:04 +0000 (11:13 -0400)
* 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

src/shared/utils/app/is-auth-path.ts

index 5a201ac427ee90701107b6376cf714b854793bbb..fc65e0c24e15a09b321e2afe3870c2a362150703 100644 (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
   );
 }