Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#26119 closed Bug (fixed)

Catch ValueError while parsing urls in URLValidator

Reported by: Christopher Grebs Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Christopher Grebs)

Django uses urllib.urlsplit to parse an URL but in certain cases this is failing on URLs the regular expressions in URLValidator deems valid.

This appears to be a problem at least in 1.6+, probably since the URLValidator exists.

Pull Request: https://github.com/django/django/pull/6010

Change History (8)

comment:1 by Christopher Grebs, 9 years ago

Description: modified (diff)
Has patch: set
Type: UncategorizedBug

comment:2 by Christopher Grebs, 9 years ago

Description: modified (diff)

comment:3 by Christopher Grebs, 9 years ago

Description: modified (diff)

comment:4 by Markus Holtermann, 9 years ago

Triage Stage: UnreviewedAccepted
Version: 1.9master

Can confirm on 1.8 upwards.

comment:5 by Tim Graham, 9 years ago

Patch needs improvement: set

As noted on the pull request, looks like a few test cases are missing.

comment:6 by Tim Graham, 9 years ago

Component: FormsCore (Other)

comment:7 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In a9e188c:

Fixed #26119 -- Fixed URLValidator crash on URLs with brackets.

comment:8 by Tim Graham <timograham@…>, 8 years ago

In 712838a:

[1.10.x] Fixed #26119 -- Fixed URLValidator crash on URLs with brackets.

Backport of a9e188ccd6315d278795355a53bce6c1a63f5a50 from master

Note: See TracTickets for help on using tickets.
Back to Top