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 serhiy.storchaka
Recipients eric.smith, serhiy.storchaka, veky, zbysz
Date 2021-06-27.08:20:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1624782020.92.0.239458163867.issue44452@roundup.psfhosted.org>
In-reply-to
Content
I understand why this problem arose. If you parse an HTTP URL, its path always starts with "/" if not empty. And you usually want to interpret it as a relative to some base directory. But lstrip('/') works well here. In any case you need to have some validation to disallow "..".

I think that adding yet one operation will confuse users. And what to do with C:\foo\bar, C:foo\bar, \\?\c\foo\bar, etc?
History
Date User Action Args
2021-06-27 08:20:20serhiy.storchakasetrecipients: + serhiy.storchaka, eric.smith, zbysz, veky
2021-06-27 08:20:20serhiy.storchakasetmessageid: <1624782020.92.0.239458163867.issue44452@roundup.psfhosted.org>
2021-06-27 08:20:20serhiy.storchakalinkissue44452 messages
2021-06-27 08:20:20serhiy.storchakacreate