Add comprehensive shell argument escaping using POSIX single-quote method. Problem: - Current code only escapes single quotes inline - Other shell metacharacters ($, `, !, etc.) not explicitly handled - Document ID in retain() was not escaped Solution: - Add exported escapeShellArg() function using POSIX single-quote escaping - Replace inline escaping with shared function - Escape document ID in retain() - Add comprehensive tests (17 test cases) covering all shell-special chars The POSIX single-quote method handles ALL shell metacharacters by wrapping in single quotes (which protect everything except single quotes themselves) and escaping any embedded single quotes with '\'' sequence. |
||
|---|---|---|
| .. | ||
| litellm | ||
| openclaw | ||