Ticket #2366 defect new
FilePath should allow access to all possible paths on Windows
|Reported by:||jknight||Owned by:|
|Cc:||teratorn, wilcoxjg@…, davidsarah, zooko@…, bock.harryw@…||Branch:|
Description (last modified by exarkun) (diff)
FilePath incorrectly prohibits access to certain files, due to the crummy APIs it's using.
For example, you can actually have a file called "CON" on windows, and it is accessible by quoting the path in various ways (or by accessing it via native Windows APIs), but FilePath would currently consider that path a security violation, regardless of whether it actually exists.
Additionally, Windows paths may natively be unicode. FilePath doesn't really pay attention to unicode vs str, so it may be broken with respect to non-ASCII(?) paths. Even if it does work, it needs unit tests to demonstrate this and prevent regressions.