[wp-trac] [WordPress Trac] #21552: Move option sanitization in network/settings.php to sanitize_option
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 16 18:38:19 UTC 2012
#21552: Move option sanitization in network/settings.php to sanitize_option
----------------------------+------------------
Reporter: wonderboymusic | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.5
Component: Multisite | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+------------------
Comment (by nacin):
Seems to me like in both cases, we also need to account for the value
possibly being an array (someone making a change manually, rather than
through settings.php).
Illegal names handling can probably be simplified to:
{{{
if ( ! is_array( $value ) )
$value = explode( ' ', $value );
$value = array_filter( array_map( 'trim', $value ) );
if ( ! $value )
$value = '';
}}}
Also, stripslashes() already occurs in the settings.php handler (just as
it does in options.php).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21552#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list