Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#26119 closed Bug (fixed)

Catch ValueError while parsing urls in URLValidator

Reported by: Christopher Grebs Owned by: nobody
Component: Core (Other) Version: master
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 5 years ago by Christopher Grebs

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

comment:2 Changed 5 years ago by Christopher Grebs

Description: modified (diff)

comment:3 Changed 5 years ago by Christopher Grebs

Description: modified (diff)

comment:4 Changed 5 years ago by Markus Holtermann

Triage Stage: UnreviewedAccepted
Version: 1.9master

Can confirm on 1.8 upwards.

comment:5 Changed 5 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 4 years ago by Tim Graham

Component: FormsCore (Other)

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

Resolution: fixed
Status: newclosed

In a9e188c:

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

comment:8 Changed 4 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