[wp-trac] [WordPress Trac] #10454: Add support for setting users_can_register option via XML-RPC and sanitize the option value
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 21 04:45:13 UTC 2009
#10454: Add support for setting users_can_register option via XML-RPC and sanitize
the option value
-------------------------+--------------------------------------------------
Reporter: josephscott | Owner: josephscott
Type: enhancement | Status: new
Priority: normal | Milestone: 2.9
Component: XML-RPC | Version: 2.8.1
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
I looked at adding support to manage the users_can_register ('Membership')
option via XML-RPC (using the existing wp.setOptions method) and found
that the users_can_register value wasn't being sanitized. There was also
a problem with wp.setOptions not working if the value of the option
evaluated to false with the empty() function.
So first up, I have a patch to xmlrpc.php that adds support for managing
the users_can_register option and removes the empty() check on the option
value.
Second is a patch to the sanitize_option() function that makes sure that
the value for the users_can_register option is an integer. Under normal
situations this limits the value to either zero or one.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10454>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list