-
Notifications
You must be signed in to change notification settings - Fork 0
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
Spike/images inslides #410
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
return compatibleDomains.some((domain) => { | ||
const matchRegex = new RegExp( | ||
`https?://([^/]*\\.)?${domain.replace(/\./g, "\\.")}`, |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 1 month ago
To fix the problem, we need to ensure that all special characters, including backslashes, are properly escaped in the domain
string before it is used to construct the regular expression. The best way to achieve this is to use a well-tested sanitization library or to manually escape all special characters using a regular expression with the global flag.
In this case, we will manually escape all special characters, including backslashes, in the domain
string. This involves replacing each special character with its escaped counterpart.
-
Copy modified line R182 -
Copy modified line R184
@@ -181,4 +181,5 @@ | ||
return compatibleDomains.some((domain) => { | ||
const escapedDomain = domain.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); | ||
const matchRegex = new RegExp( | ||
`https?://([^/]*\\.)?${domain.replace(/\./g, "\\.")}`, | ||
`https?://([^/]*\\.)?${escapedDomain}`, | ||
"i", |
Playwright test resultsDetails Open report ↗︎ Flaky testsNo persona › tests/modifiy-lesson.test.ts › Modify a lesson plan › Modify a lesson resource Skipped testsNo persona › tests/auth.test.ts › authenticate through Clerk UI |
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
Description