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 ExtraVeral
Recipients ExtraVeral, pitrou, steven.daprano
Date 2014-02-24.15:51:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAGfDe5DV-cZHane0ZtbwgcEGADFUmxWbgmwO7MY-2JEJiw1+9g@mail.gmail.com>
In-reply-to <1393254192.18.0.213175338918.issue20761@psf.upfronthosting.co.za>
Content
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 own
path :P

On Mon, Feb 24, 2014 at 4:03 PM, Steven D'Aprano <report@bugs.python.org>wrote:

>
> 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 not to modify the substrings. Would you expect it to complain
> about this? os.path.join('/', 'AUX')? (AUX is a reserved name and forbidden
> for file names under Windows.)
>
> I don't think it is up to join to validate that the path generated is
> legal, so I don't think this is a bug in join.
>
> ----------
> nosy: +stevenjd
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue20761>
> _______________________________________
>
History
Date User Action Args
2014-02-24 15:51:29ExtraVeralsetrecipients: + ExtraVeral, pitrou, steven.daprano
2014-02-24 15:51:29ExtraVerallinkissue20761 messages
2014-02-24 15:51:29ExtraVeralcreate