Message74784
Python3 skips environment variables which can not be parsed and
decoded as unicode strings. But exec*() functions keep the original
environment and so the child process environment is different than the
Python environement (than os.environ).
I propose to remove these variables to avoid strange behaviours, but
also to avoid possible security issues.
The attached patch is an implementation of this idea using a custom
implementation of unsetenv(): _Py_unsetenv() argument is not the name
of the variable but the raw variable including the value (eg. "a=b").
So it's also possible to drop truncated variables like "a" (no value
nor "=" character).
This issue also affects Python2 since Python2 does also skip variable
with no value but the variables still exist in memory (and so child
process get them). |
|
Date |
User |
Action |
Args |
2008-10-15 00:45:26 | vstinner | set | recipients:
+ vstinner |
2008-10-15 00:45:25 | vstinner | set | messageid: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> |
2008-10-15 00:45:23 | vstinner | link | issue4126 messages |
2008-10-15 00:45:22 | vstinner | create | |
|