mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-02 09:18:06 +00:00
fix(web): remove redundant htmx.org substring check flagged by CodeQL
CodeQL flags .includes('htmx.org') as "incomplete URL substring
sanitization" - a false positive here, since this string is only ever
matched against console.error/warn message text to decide whether to
suppress a known-harmless HTMX timing-race log line, not used for any
URL-trust/redirect decision. The check was also redundant: 'htmx' is
already a substring of 'htmx.org', so the plain .includes('htmx') check
right next to it already covers every case the removed check did.
This commit is contained in:
@@ -69,12 +69,11 @@
|
|||||||
errorStr.includes("reading 'insertBefore'")) {
|
errorStr.includes("reading 'insertBefore'")) {
|
||||||
// Check if it's from HTMX by looking at stack trace or error string
|
// Check if it's from HTMX by looking at stack trace or error string
|
||||||
// Also check the call stack if available
|
// Also check the call stack if available
|
||||||
const isHtmxError = errorStr.includes('htmx.org') ||
|
const isHtmxError = errorStr.includes('htmx') ||
|
||||||
errorStr.includes('htmx') ||
|
|
||||||
errorStack.includes('htmx') ||
|
errorStack.includes('htmx') ||
|
||||||
args.some(arg => {
|
args.some(arg => {
|
||||||
if (typeof arg === 'string') {
|
if (typeof arg === 'string') {
|
||||||
return arg.includes('htmx.org') || arg.includes('htmx');
|
return arg.includes('htmx');
|
||||||
}
|
}
|
||||||
// Check error objects for stack traces
|
// Check error objects for stack traces
|
||||||
if (arg && typeof arg === 'object' && arg.stack) {
|
if (arg && typeof arg === 'object' && arg.stack) {
|
||||||
|
|||||||
Reference in New Issue
Block a user