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:
parent
d90bb2403a
commit
dfab3319f8
@ -3615,6 +3615,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
return(new IXR_Error(401, __('Invalid post type.')));
|
return(new IXR_Error(401, __('Invalid post type.')));
|
||||||
break;
|
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'];
|
$post_author = $content_struct['wp_author_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user