valid_email in utils.py does not match IDNs

RESOLVED WONTFIX

Status

Cloud Services
Server: Core
RESOLVED WONTFIX
7 years ago
6 years ago

People

(Reporter: ygjb, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [infrasec:nsr][ws:none])

(Reporter)

Description

7 years ago
server-core/services/utils.py contains a defined regex _NAME_DOMAIN_ that is used to validate email addresses, but it will not accept an IDN.

245 _IP_DOMAIN = '([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})'
246 _NAME_DOMAIN = '(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})'
247 _DOMAIN = '(%s|%s)' % (_IP_DOMAIN, _NAME_DOMAIN)
248 _RE_EMAIL = '^%s@%s$' % (_USER, _DOMAIN)
249 _RE_EMAIL = re.compile(_RE_EMAIL)
This pattern is the one used in the PHP app, I just copied over.

I need to check first if unicode chars for emails are supported in our storage and all apps.
Status: NEW → ASSIGNED
(Reporter)

Updated

7 years ago
Whiteboard: [infrasec:nsr][ws:none]
Not something we'll be validating in the post-browserid world.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.