Project

General

Profile

Actions

Refactor #14641

open

Simplify e-mail address regex

Added by Stephen Benjamin over 8 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
E-Mail
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The regex in user.rb is probably one of the better ones, everything I'd expect to validate validates. However, I'd still propose it's removed, or refactored to simply be /@/.

First, some reasoning: https://davidcel.is/posts/stop-validating-email-addresses-with-regex/

Second, with RFC5322, UTF-8 is now permitted on modern servers. 甲斐@黒川.日本 is a valid e-mail address.

Also, the 60 length limit is not found in any RFC.


Related issues 3 (0 open3 closed)

Related to Foreman - Bug #9584: User email address length has maximum length of 60.ClosedDaniel Lobato Garcia02/27/2015Actions
Related to Foreman - Bug #5811: User email validation doesn't exactly match specificationClosed05/20/2014Actions
Related to Foreman - Bug #12543: Email id with latin,utf-8 is not accepted while creating userClosedAmir Fefer11/19/2015Actions
Actions

Also available in: Atom PDF