mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 18:12:52 +00:00
* fix(security): handle additional Unicode angle bracket homoglyphs in content sanitization The foldMarkerChar function sanitizes external content markers to prevent prompt injection boundary escapes, but only handles fullwidth ASCII (U+FF21-FF5A) and fullwidth angle brackets (U+FF1C/FF1E). Add handling for additional visually similar Unicode characters that could be used to craft fake end markers: - Mathematical angle brackets (U+27E8, U+27E9) - CJK angle brackets (U+3008, U+3009) - Left/right-pointing angle brackets (U+2329, U+232A) - Single angle quotation marks (U+2039, U+203A) - Small less-than/greater-than signs (U+FE64, U+FE65) * test(security): add homoglyph marker coverage --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
8.7 KiB
8.7 KiB