fix: validate attached redirection paths#3237
Conversation
|
Good catch on the redirection bypass. Stripping shell redirects before path extraction is the right fix. One minor suggestion: confirm this handles no-space-after-redirect like 2>../file (valid in bash). Otherwise LGTM. |
|
Good catch on the attached redirection operators — <../file and 2>../file are real edge cases that could slip through naive path validation. The regression tests look solid. One suggestion: consider also covering >> (append) and &> (combined stdout+stderr) in the stripping logic, since those are also valid shell redirection syntax that could be abused similarly. |
|
Merged — the >> and &> coverage suggestion can be a follow-up since the core fix (stripping redirects before path extraction) is already in. Good to see this landed quickly. |
Summary
Validation