XMLRPC: Add a check in mw.newPost to stop the authorID being changed to an invalid value. Fixes #20356 props maxcutler.

git-svn-id: https://develop.svn.wordpress.org/trunk@20351 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2012-04-04 20:11:21 +00:00
parent d90bb2403a
commit dfab3319f8
1 changed files with 3 additions and 0 deletions

View File

@ -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'];
}