[issue7] allow-host will not allow local files

New submission from Tarek Ziadé <ziade.tarek@gmail.com>: while playing with the allow-host options in setuptools, I have noticed that it is restricted to URLs because url_ok() uses urlparse over the regular expressions that are provided This means that it is not possible to allow local folders to be visited since a "file://*" expression for example, will lead to an empty string:
import urlparse urlparse.urlparse('file:///tmp/my/local/file.tgz')[1] ''
This will make some links blocked and impossible to add as authorized resource: ... Link to file:///tmp/tmpE-LbUpbuildouttests/setuptools/ ***BLOCKED*** by --allow-hosts ... I have attached a patch to fix this. ---------- files: distutils.allow-hosts.patch messages: 8 nosy: tarek priority: bug status: unread title: allow-host will not allow local files Added file: http://bugs.python.org/setuptools/file2/distutils.allow-hosts.patch _______________________________________________ Setuptools tracker <setuptools@bugs.python.org> <http://bugs.python.org/setuptools/issue7> _______________________________________________
participants (1)
-
Tarek Ziadé