mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
fix(security): resolve CodeQL alerts for regex and replace
This commit is contained in:
@@ -54,7 +54,7 @@ export function buildCurl({ endpoint, method = "POST", headers, body }: CurlOpti
|
||||
|
||||
// Remove trailing backslash from last non-URL line
|
||||
const last = lines.length - 1;
|
||||
lines[last - 1] = lines[last - 1].replace(/ \\$/, " \\");
|
||||
lines[last - 1] = lines[last - 1].replace(/ \\$/, "");
|
||||
|
||||
return lines.join("\n");
|
||||
}
|
||||
|
||||
@@ -35,7 +35,10 @@ function getKnowledgeResponse(query: string): string | null {
|
||||
const q = query.toLowerCase();
|
||||
|
||||
// Architecture questions
|
||||
if (/architecture|arquitectura|pipeline|request.*flow|request.*path/.test(q)) {
|
||||
if (
|
||||
/architecture|arquitectura|pipeline/.test(q) ||
|
||||
(q.includes("request") && (q.includes("flow") || q.includes("path")))
|
||||
) {
|
||||
return `## OmniRoute Architecture
|
||||
|
||||
The request pipeline flows through:
|
||||
|
||||
Reference in New Issue
Block a user