Message141138
> I agree with Antoine - it's a simple bug
Alright, in that case I agree (I thought this was considered as a
security issue).
Two comments on the patch:
Lib/tempfile.py:
# Don't recurse to symlinked directories (issue #12464)
Is it really necessary to indicate the issue reference here (there's
already version control, no need to tag the code itself)? It does make
sense in the test, though.
Lib/test/test_tempfile.py:
def test_cleanup_with_symlink_to_a_directory(self):
# cleanup() should not follow symlinks to directories (issue #12464)
[...]
# Symlink d1/foo -> d2
os.symlink(d2.name, os.path.join(d1.name, "foo"))
Does Windows have symlinks?
Looking at Modules/posixmodule.c, I'm not sure, and there seems to be
a version of os.symlink() that takes an argument indicating whether
the target is a directory or not. |
|
Date |
User |
Action |
Args |
2011-07-26 07:45:11 | neologix | set | recipients:
+ neologix, georg.brandl, ncoghlan, pitrou, abacabadabacaba, petri.lehtinen |
2011-07-26 07:45:10 | neologix | link | issue12464 messages |
2011-07-26 07:45:09 | neologix | create | |
|