From: Security-Chief-Odo <87156706+Security-Chief-Odo@users.noreply.github.com>
Date: Tue, 4 Jul 2023 15:13:04 +0000 (-0500)
Subject: Updated the regex for isAuthPath to reduce false positive hits (#1806)
X-Git-Url: http://these/git/%22https:/www.exeterceilidhs.net/%22%7B%7D/readmes/README.ja.md?a=commitdiff_plain;h=ba9389c15edfd501affcddfeec2209c74ce9fe96;p=lemmy-ui.git

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
---

diff --git a/src/shared/utils/app/is-auth-path.ts b/src/shared/utils/app/is-auth-path.ts
index 5a201ac..fc65e0c 100644
--- a/src/shared/utils/app/is-auth-path.ts
+++ b/src/shared/utils/app/is-auth-path.ts
@@ -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
   );
 }