Opened 2 years ago

Closed 2 years ago

#33367 closed Bug (fixed)

URLField throws ValueError instead of ValidationError on clean

Reported by: Florian Apolloner Owned by: Pedro Schlickmann Mendes
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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

Change History (6)

comment:1 by Florian Apolloner, 2 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Mariusz Felisiak, 2 years ago

Component: UncategorizedCore (Other)
Needs tests: unset
Type: UncategorizedBug

comment:3 by Pedro Schlickmann Mendes, 2 years ago

Owner: changed from nobody to Pedro Schlickmann Mendes
Status: newassigned

comment:4 by Pedro Schlickmann Mendes, 2 years ago

Has patch: set
Last edited 2 years ago by Mariusz Felisiak (previous) (diff)

comment:5 by Mariusz Felisiak, 2 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In e8b4fedd:

Fixed #33367 -- Fixed URLValidator crash in some edge cases.

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