Georg Brandl added the comment:
Agreed.
--
nosy: +georg.brandl
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20761
___
___
New submission from Tiberiu Dragulinescu:
d=asdasd+chr(10)
print os.path.normpath(os.path.join('a/b',d,'d'))
a\b\asdasd
\d
LF or CR cannot be part of a URI (rfc1738)
--
components: Windows
messages: 212099
nosy: ExtraVeral
priority: normal
severity: normal
status: open
title:
Steven D'Aprano added the comment:
LF or CR cannot be part of a URI
But they can be part of a filename, at least on POSIX systems. Are you
proposing that only the Windows version of os.path.join strip LF/CR?
I don't think that it up to the join function to validate the path, and
certainly
Antoine Pitrou added the comment:
This doesn't sound like a bug. File paths are not URIs: almost all characters
are valid in a POSIX filename. Also, sanity checking of user input is up to the
caller.
I recommend closing this issue.
--
nosy: +pitrou
resolution: - invalid
Tiberiu Dragulinescu added the comment:
The join function should know that it will compose a path with the provided
string, so I think it should complain or ignore ilegal path/filename
components, in regard to the host OS.
But if it is not a valid point of view python-wise, one can check his