sanitize domains in ms-options, fixes #11775
git-svn-id: http://svn.automattic.com/wordpress/trunk@13447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
42703bfe08
commit
a399b4b845
|
@ -40,7 +40,10 @@ switch ( $_GET['action'] ) {
|
|||
if ( $_POST['limited_email_domains'] != '' ) {
|
||||
$limited_email_domains = str_replace( ' ', "\n", $_POST[ 'limited_email_domains' ] );
|
||||
$limited_email_domains = split( "\n", stripslashes( $limited_email_domains ) );
|
||||
$limited_email = array();
|
||||
foreach ( (array) $limited_email_domains as $domain ) {
|
||||
$domain = trim( $domain );
|
||||
if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
|
||||
$limited_email[] = trim( $domain );
|
||||
}
|
||||
update_site_option( "limited_email_domains", $limited_email );
|
||||
|
@ -50,7 +53,10 @@ switch ( $_GET['action'] ) {
|
|||
|
||||
if ( $_POST['banned_email_domains'] != '' ) {
|
||||
$banned_email_domains = split( "\n", stripslashes( $_POST[ 'banned_email_domains' ] ) );
|
||||
$banned = array();
|
||||
foreach ( (array) $banned_email_domains as $domain ) {
|
||||
$domain = trim( $domain );
|
||||
if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
|
||||
$banned[] = trim( $domain );
|
||||
}
|
||||
update_site_option( "banned_email_domains", $banned );
|
||||
|
|
Loading…
Reference in New Issue