XMLRPC: Add a check in mw.newPost to stop the authorID being changed to an invalid value. Fixes #20356 props maxcutler.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3738a692a3
commit
4b31ce3cd2
|
@ -3615,6 +3615,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
return(new IXR_Error(401, __('Invalid post type.')));
|
||||
break;
|
||||
}
|
||||
$author = get_userdata( $content_struct['wp_author_id'] );
|
||||
if ( ! $author )
|
||||
return new IXR_Error( 404, __( 'Invalid author ID.' ) );
|
||||
$post_author = $content_struct['wp_author_id'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue