[issue4489] shutil.rmtree is vulnerable to a symlink attack

Antoine Pitrou report at bugs.python.org
Sat Nov 5 01:11:27 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> Finally, since writting a such code is tricky, what do you - all -
> think of making this a generic walker method that would take as
> argument the methods to call on a directory and on a file (or link),
> so that we could reuse it to write chmodtree(), chowntree() and
> friends?

Sounds good.
FYI, I have a pathlib experiment in
http://hg.python.org/features/pathlib/, with an optional openat-based
accessor.

----------

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


More information about the Python-bugs-list mailing list