diff options
| author | Daisuke Aritomo <osyoyu@osyoyu.com> | 2025-11-04 14:34:31 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-11-04 06:45:16 +0000 |
| commit | 397bb12778dd8940572e3fc4156085f1ca57f056 (patch) | |
| tree | 3f1bbdd424a46024ad3a9cf6b0121183c5bbd50e /include/ruby | |
| parent | 447809658afa851b6523397103c2fce74c4d5562 (diff) | |
[ruby/uri] Re-allow consecutive, leading and trailing dots in EMAIL_REGEXP
Effectively reverts commit https://github.com/ruby/uri/commit/788274b180d6 and
https://github.com/ruby/uri/commit/0abac721d8fe.
EMAIL_REGEXP was mostly drawn from WHATWG HTML LS. This spec states that
it intentionally violates RFC 5322 to provide a practical regex for
validation.
> This requirement is a willful violation of RFC 5322, which defines a
> syntax for email addresses that is simultaneously too strict (before the
> "@" character), too vague (after the "@" character), and too lax
> (allowing comments, whitespace characters, and quoted strings in manners
> unfamiliar to most users) to be of practical use here.
The allowing of consecutive dot s(`a..a@`) and leading/trailing dots
(`.a@`, `a.@`) is not the only derivation from RFC 5322. If a truly RFC
5322-compliant regexp is needed, tt should be organized under a
different name, since too much departure from the original EMAIL_REGEXP
must be introduced.
https://github.com/ruby/uri/commit/c551d7020b
Diffstat (limited to 'include/ruby')
0 files changed, 0 insertions, 0 deletions
