[Django] #33367: URLField throws ValueError instead of ValidationError on clean

0 views
Skip to first unread message

Django

unread,
Dec 15, 2021, 6:56:56 AM12/15/21
to django-...@googlegroups.com
#33367: URLField throws ValueError instead of ValidationError on clean
---------------------------------------------+------------------------
Reporter: Florian Apolloner | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 1
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
---------------------------------------------+------------------------
{{{
forms.URLField( ).clean('////]@N.AN')
}}}
results in:
{{{
ValueError: Invalid IPv6 URL
Traceback (most recent call last):
File "basic_fuzzer.py", line 22, in TestOneInput
File "fuzzers.py", line 350, in test_forms_URLField
File "django/forms/fields.py", line 151, in clean
File "django/forms/fields.py", line 136, in run_validators
File "django/core/validators.py", line 130, in __call__
File "urllib/parse.py", line 440, in urlsplit
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33367>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 15, 2021, 6:57:58 AM12/15/21
to django-...@googlegroups.com
#33367: URLField throws ValueError instead of ValidationError on clean
-----------------------------------+------------------------------------

Reporter: Florian Apolloner | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Florian Apolloner):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/33367#comment:1>

Django

unread,
Dec 15, 2021, 6:59:24 AM12/15/21
to django-...@googlegroups.com
#33367: URLField throws ValueError instead of ValidationError on clean
-----------------------------------+------------------------------------

Reporter: Florian Apolloner | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* type: Uncategorized => Bug
* component: Uncategorized => Core (Other)
* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/33367#comment:2>

Django

unread,
Dec 15, 2021, 9:27:14 AM12/15/21
to django-...@googlegroups.com
#33367: URLField throws ValueError instead of ValidationError on clean
-------------------------------------+-------------------------------------
Reporter: Florian Apolloner | Owner: Pedro
| Schlickmann Mendes
Type: Bug | Status: assigned

Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Pedro Schlickmann Mendes):

* owner: nobody => Pedro Schlickmann Mendes
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/33367#comment:3>

Django

unread,
Dec 15, 2021, 10:04:48 AM12/15/21
to django-...@googlegroups.com
#33367: URLField throws ValueError instead of ValidationError on clean
-------------------------------------+-------------------------------------
Reporter: Florian Apolloner | Owner: Pedro
| Schlickmann Mendes
Type: Bug | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Pedro Schlickmann Mendes):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/33367#comment:4>

Django

unread,
Dec 20, 2021, 1:32:25 AM12/20/21
to django-...@googlegroups.com
#33367: URLField throws ValueError instead of ValidationError on clean
-------------------------------------+-------------------------------------
Reporter: Florian Apolloner | Owner: Pedro
| Schlickmann Mendes
Type: Bug | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33367#comment:5>

Django

unread,
Dec 20, 2021, 2:05:29 AM12/20/21
to django-...@googlegroups.com
#33367: URLField throws ValueError instead of ValidationError on clean
-------------------------------------+-------------------------------------
Reporter: Florian Apolloner | Owner: Pedro
| Schlickmann Mendes
Type: Bug | Status: closed

Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"e8b4feddc34ffe5759ec21da8fa027e86e653f1c" e8b4fedd]:
{{{
#!CommitTicketReference repository=""
revision="e8b4feddc34ffe5759ec21da8fa027e86e653f1c"
Fixed #33367 -- Fixed URLValidator crash in some edge cases.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33367#comment:6>

Reply all
Reply to author
Forward
0 new messages