Opened 7 years ago

Closed 7 years ago

Last modified 7 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 Changed 7 years ago by Christopher Grebs

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

comment:2 Changed 7 years ago by Christopher Grebs

Description: modified (diff)

comment:3 Changed 7 years ago by Christopher Grebs

Description: modified (diff)

comment:4 Changed 7 years ago by Markus Holtermann

Triage Stage: UnreviewedAccepted
Version: 1.9master

Can confirm on 1.8 upwards.

comment:5 Changed 7 years ago by Tim Graham

Patch needs improvement: set

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

comment:6 Changed 7 years ago by Tim Graham

Component: FormsCore (Other)

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

Resolution: fixed
Status: newclosed

In a9e188c:

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

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

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