[issue4126] remove not decodable environment variables

STINNER Victor report at bugs.python.org
Wed Oct 15 02:48:43 CEST 2008


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Note: I don't have Windows at home to test my patch on Windows. At 
least, the patch works correctly on Ubuntu Gutsy/i386.

Example to demonstrate the issue:
$ env -i a=a b=$(echo -e '--\xff--') c=c ./python -c "import os; 
os.execvp('/usr/bin/env', ['/usr/bin/env'])"
a=a
b=--�--
c=c

Patched Python:
$ env -i a=a b=$(echo -e '--\xff--') c=c ./python -c "import os; 
os.execvp('/usr/bin/env', ['/usr/bin/env'])"
a=a
c=c

I tested Python 2.5: b is also removed, but Python 2.6 keeps the 
variable b.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4126>
_______________________________________


More information about the Python-bugs-list mailing list