3 ms·
The real lesson here is that environment variables can't be blindly trusted and that they can be controlled by an attacker unless proven otherwise. They should
by DasIch 10y ago
The real lesson here is that environment variables can't be blindly trusted and that they can be controlled by an attacker unless proven otherwise. They should be treated as untrusted input that needs to be validated.
If you start a new process, always be explicit about the environment variables you want to pass on. Don't just let the subprocess inherit your environment variables.
If you write a library, do not rely on environment variables unless the user of the library has explicitly opted-in to that.
- omribahumi 10y agoCGI prefixes environment variables with "HTTP_" (for HTTP headers), the problem is this prefix is not unique.