Opened 11 years ago

Closed 11 years ago

Last modified 3 years ago

#22123 closed Bug (fixed)

EmailValidator does not accept IPv6 literals

Reported by: Sasha Romijn Owned by: Sasha Romijn
Component: Forms Version: dev
Severity: Normal Keywords: nlsprint14
Cc: eromijn@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

EmailValidator currently supports normal domains (foo@…) and IPv4 literals (foo@[192.0.2.1]). IPv6 support is currently missing (foo@[2001:db8::1]). This is specified to be valid, along with the other IPv6 notations, in RFC 5321 section 4.1.3.

Change History (4)

comment:1 by Sasha Romijn, 11 years ago

Cc: eromijn@… added
Has patch: set

PR in https://github.com/django/django/pull/2348

This also cleans up the IPv4 regex used in EmailValidator, as that is already available as part of the existing IPv4 validator. The regex previously used as part of domain_regex was identical, so this does not break backwards compatibility.

comment:2 by Sasha Romijn, 11 years ago

Owner: changed from nobody to Sasha Romijn
Status: newassigned

comment:3 by Baptiste Mispelon <bmispelon@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 98f13762d7e18c0ba12044eed56e9198ca056c66:

Fixed #22123 -- EmailValidator now also accepts IPv6 literals in addresses

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In 61d92c6:

Refs #22123 -- Added more URLValidator test for invalid IPv6 literals.

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