[wp-trac] [WordPress Trac] #21537: Email address sanitisation mangles valid email addresses
WordPress Trac
noreply at wordpress.org
Fri Apr 1 16:43:28 UTC 2016
#21537: Email address sanitisation mangles valid email addresses
--------------------------------------------+------------------------------
Reporter: westi | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 3.4.1
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch is-email | Focuses:
--------------------------------------------+------------------------------
Comment (by jrfoell):
Just adding a note here so this doesn't get forgotten, since it appears to
be 4 years old :-/
I was able to get around the problem during a bulk user import (where the
dataset is known) by doing:
{{{#!php
<?php
if ( strpos( $user_email, '&' ) !== false ) {
//Turn off wp_filter_kses for this email
remove_filter( 'pre_user_email', 'wp_filter_kses' );
}
wp_insert_user(...);
add_filter( 'pre_user_email', 'wp_filter_kses' );
}}}
I wouldn't advise doing this to open user registrations... posting here to
help this issue bubble up :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21537#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list