Opened 3 years ago

Closed 3 years ago

#22123 closed Bug (fixed)

EmailValidator does not accept IPv6 literals

Reported by: Erik Romijn Owned by: Erik Romijn
Component: Forms Version: master
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 (3)

comment:1 Changed 3 years ago by Erik Romijn

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 Changed 3 years ago by Erik Romijn

Owner: changed from nobody to Erik Romijn
Status: newassigned

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

Resolution: fixed
Status: assignedclosed

In 98f13762d7e18c0ba12044eed56e9198ca056c66:

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

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