mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 11:40:25 +00:00
fix(exec): escape invisible approval filler chars
This commit is contained in:
@@ -8,6 +8,12 @@ describe("sanitizeExecApprovalDisplayText", () => {
|
||||
it("escapes unicode format characters but leaves other text intact", () => {
|
||||
expect(sanitizeExecApprovalDisplayText("echo hi\u200Bthere")).toBe("echo hi\\u{200B}there");
|
||||
});
|
||||
|
||||
it("escapes visually blank hangul filler characters used for spoofing", () => {
|
||||
expect(sanitizeExecApprovalDisplayText("date\u3164\uFFA0\u115F\u1160가")).toBe(
|
||||
"date\\u{3164}\\u{FFA0}\\u{115F}\\u{1160}가",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolveExecApprovalCommandDisplay", () => {
|
||||
|
||||
Reference in New Issue
Block a user