[wp-trac] [WordPress Trac] #12868: General Settings Page Needs Error Checking
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 24 15:11:55 UTC 2010
#12868: General Settings Page Needs Error Checking
----------------------------+-----------------------------------------------
Reporter: Josh Jones | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.0
Component: Administration | Version: 2.9.2
Severity: major | Keywords: error checking, blank value, has-patch, dev-feedback
----------------------------+-----------------------------------------------
Comment(by dd32):
Perhaps this could be changed to:
{{{
case 'siteurl':
$value = esc_url_raw($value);
if ( !is_url( $value ) ) {
$value = get_option( $option ); // Resets option to stored val in
case of empty
if ( function_exists('add_settings_error')
add_settings_error('siteurl', 'invalid_siteurl', __('The
WordPress address you submitted was not in the right format. Please enter
a valid URL.'));
}
break;
}}}
that way it'll prevent against acidental changes elsewhere too perhaps?
I'll review it more in the morning
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12868#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list