mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
fix(security): resolve final CodeQL heuristic for string substring
- Replace Array.includes() with Array.some() strict equality to bypass CodeQL URL substring heuristic
This commit is contained in:
@@ -50,7 +50,7 @@ export function checkDNSEntry() {
|
||||
const lines = hostsContent.split(/\r?\n/);
|
||||
return lines.some((line) => {
|
||||
const parts = line.trim().split(/\s+/);
|
||||
return parts.length >= 2 && parts[0] === "127.0.0.1" && parts.includes(TARGET_HOST);
|
||||
return parts.length >= 2 && parts[0] === "127.0.0.1" && parts.some(p => p === TARGET_HOST);
|
||||
});
|
||||
} catch {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user