2 ms·
Unfortunately the specs for system() and popen() require the use of shells. It was known that you had to escape arguments and control the names of environment
by nitrogen 12y ago
Unfortunately the specs for system() and popen() require the use of shells. It was known that you had to escape arguments and control the names of environment variables, but it's entirely bizarre to expect people to know before shellshock that the values of otherwise completely safe and sanitized variables might still be interpreted by bash as code.
We shouldn't have to give up popen() just because bash was designed insecurely; we should fix or replace bash.