[wp-trac] [WordPress Trac] #44616: WordPress core registration email field not EAI / IDN (Internationalised Domain Name) compatible
WordPress Trac
noreply at wordpress.org
Sat Jul 21 10:44:01 UTC 2018
#44616: WordPress core registration email field not EAI / IDN (Internationalised
Domain Name) compatible
------------------------------------+------------------------
Reporter: belikewata | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Login and Registration | Version: 4.9.7
Severity: major | Resolution: duplicate
Keywords: | Focuses:
------------------------------------+------------------------
Changes (by birgire):
* status: new => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Comment:
Welcome to WordPress Core Trac @belikewata
The {{{register_new_user()}}} function, from the register part of {{{wp-
login.php}}}, calls {{{is_email()}}}, where the validation for the local
part:
{{{
// LOCAL PART
// Test for invalid characters
if ( ! preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) {
/** This filter is documented in wp-includes/formatting.php */
return apply_filters( 'is_email', false, $email,
'local_invalid_chars' );
}
}}}
and the domain part:
{{{
// Test for invalid characters
if ( ! preg_match( '/^[a-z0-9-]+$/i', $sub ) ) {
/** This filter is documented in wp-includes/formatting.php */
return apply_filters( 'is_email', false, $email,
'sub_invalid_chars' );
}
}}}
seems to be too restrictive.
The IDN support for {{{is_email()}}} seems to belong to ticket #24487, so
I close this one.
Please join in there with your research, thanks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44616#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list