benrg <benrud...@gmail.com> added the comment:

This bug is about paths that compare *equal*, but refer to *different* files. I 
agree that the opposite is not much of a problem (and I said so in the original 
comment).

The reason I classified this as a security bug is that Python scripts using 
pathlib on Windows could be vulnerable in certain cases to an attacker that can 
choose file names. For example, the order in which paths are added to a set or 
dict could affect which of two files is seen by the script. If different parts 
of the script add files in different orders - which would normally be safe - 
the result could be similar to a TOCTTOU race.

I don't disagree that "doing a good enough job of case folding is better than 
ignoring it." I just think that pathlib should not case-fold strings that 
Windows filesystems don't.

----------
nosy: +pitrou
type: enhancement -> security

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32612>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to