fix: refine security validation messaging

Agent-Logs-Url: https://github.com/MemPalace/mempalace/sessions/775f2fc4-3051-462e-8586-6d694b55da0d

Co-authored-by: igorls <4753812+igorls@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-12 22:25:41 +00:00
committed by Igor Lins e Silva
parent 248ecd98f1
commit 976289aa5c
3 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -69,11 +69,11 @@ def sanitize_query(raw_query: str) -> dict:
def _strip_wrapping_quotes(candidate: str) -> str:
candidate = candidate.strip()
while candidate[:1] in {"'", '"'} or candidate[-1:] in {"'", '"'}:
while candidate[:1] in {"'", '"'} and candidate[-1:] in {"'", '"'}:
candidate = candidate.strip("\"'")
if not candidate:
return ""
return candidate
return candidate.strip("\"'")
def _trim_candidate(candidate: str) -> str:
candidate = _strip_wrapping_quotes(candidate)