3 ms·
Passing data as arguments is even more dangerous, especially when the program is a shell.
by honkhonkpants 10y ago
Passing data as arguments is even more dangerous, especially when the program is a shell.
- spriggan3 10y agoGood point. Well at least namespace data correctly , or dump the request, headers + body in a single CGI env variable.
- toast0 10y agoCGI did namespace these headers correctly: headers X becomes HTTP_X. The problem is that the outgoing proxy config variables aren't PROXY_X, they're X_PROXY. (Other env variables from CGI aren't namespaced, however) Dumping the headers into a single env variable means a) you need to have support for pretty big environment variables which probably wasn't realistic in 1993; b) every program that wants to use headers needs to know how to parse them, which is tricky. Dumping the body into an env variable is bad because any reasonably sized body is not going to fit, and you really want the program to be able to start working on it before it completes.