# php_escape_shell_cmd

- Thread: https://externals.io/message/1403
- Original archive: https://news-web.php.net/php.internals/1403
- Started by Jamison Charlesworth on 2003-05-09T09:23:48+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1403 — Jamison Charlesworth — 2003-05-09T09:23:48+00:00

URL: https://externals.io/message/1403#1403

Hi

 

I am thinking of making a mod to this to help people using scripts on my
virtual servers.

 

At present when in SAFE_MODE the pipe '|' and redirect '<' '>'  entries
are escaped, and the reasons for this are well understood.

 

However, I am thinking that if the executable is in safe_mode_exec_dir
and the command being 'piped' to is also in the safe_mode_exec_dir then
this would be safe to allow.

 

Also, if a file beinf redirected via < or > is within the DOCUMENT_ROOT
then this should also be allowed.

 

Any views on this?

 

Regards, Jamie.
