Commit 463b0b6
committed
fix: allow curl/wget with stderr redirects in plan mode bash allowlist
The `>` redirect detection in isSafeCommand() was falsely blocking common
curl patterns like `curl ... 2>/dev/null` and `curl ... 2>&1 | head`.
This prevented agents from fetching web content (e.g. via jina.ai or
markdown.new) during planning mode.
Fix: strip safe fd redirects (2>/dev/null, 2>&1, &>/dev/null) from the
command before checking against destructive patterns, while still
blocking actual file redirects like `> output.txt`.
https://claude.ai/code/session_01Jk1P5aZPERSzrmA9urfb4B1 parent c7ae789 commit 463b0b6
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
| |||
0 commit comments