This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients abacabadabacaba, georg.brandl, ncoghlan, neologix, petri.lehtinen, pitrou
Date 2011-07-26.07:45:09
SpamBayes Score 2.6874107e-09
Marked as misclassified No
Message-id <CAH_1eM3SmAR8DisytwCgVa-3Pocczv7n=0y+vsBAX9e9yt9LwQ@mail.gmail.com>
In-reply-to <1311645368.86.0.968101308186.issue12464@psf.upfronthosting.co.za>
Content
> 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.
History
Date User Action Args
2011-07-26 07:45:11neologixsetrecipients: + neologix, georg.brandl, ncoghlan, pitrou, abacabadabacaba, petri.lehtinen
2011-07-26 07:45:10neologixlinkissue12464 messages
2011-07-26 07:45:09neologixcreate