[wp-trac] [WordPress Trac] #31992: Unicode Email Addresses
WordPress Trac
noreply at wordpress.org
Thu Nov 12 17:23:00 UTC 2020
#31992: Unicode Email Addresses
--------------------------+---------------------
Reporter: ysalame | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: is-email | Focuses:
--------------------------+---------------------
Comment (by prfidneai):
Hi!
I opened #51732 ticket to propose a patch to change email validation rules
to work with EAI, but it was recognized a duplicate of this one.
As I can se nothing was changed with EAI for 6 years from the time this
ticket was open and Unicode EAI cannot be used in WP. I would like to
propose some things to fix it:
1) Let's modify sanitize_email() and is_email() to use special
constants for regex check username and domain name WP_IDN_LOCAL_MAIL_REGEX
and WP_IDN_DOMAIN_REGEX in default-constants.php which every admin can
change to validate IDN domains rules for language he uses. For example I
added Russian IDN rules to these regexes.
2) Let's also add decode_punycode() to sanitize_email() function
which check if e-mail domain part in Punycode from and convert it to
Unicode as required by uasg.tech
3) In addition to all these things we can modify sanitize_user() in
the same manner to allow Unicode usernames to WP Universal Acceptance
ready.
I attached the patch for all of these.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31992#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list