review request for anyone who likes regular expression (increasing URLs accepted by URLValidator)

83 views
Skip to first unread message

Tim Graham

unread,
Nov 25, 2014, 7:34:50 PM11/25/14
to django-d...@googlegroups.com
Danilo Bargen has done some work to expand the types of URLs accepted by URLValidator. His patch adds support for IPv6 addresses, unicode domains, and URLs containing authentication data. This has increased the complexity of the regular expression quite a bit and I would appreciate if any experts in this area could review the pull request.

https://github.com/django/django/pull/2873

Danilo Bargen

unread,
Nov 26, 2014, 9:35:27 AM11/26/14
to django-d...@googlegroups.com
Thanks Tim for bringing that up :)

The previous URLValidator would consider some valid URLs as invalid.
That can cause a lot of problems, most people would expect an URL
Validator to return some false negatives sometimes (invalid URLs
considered valid) but not false positives (valid URLs considered
invalid). Furthermore, there are probably a few other projects that depend
on Django's URLValidator (http://stackoverflow.com/q/7160737/284318).
Therefore I consider the current behavior a bug and would love to see
this in Django 1.8.

The ticket discussion can be found here: https://code.djangoproject.com/ticket/20003

Danilo
Reply all
Reply to author
Forward
0 new messages