Limit post_password exposure. Props josephscott for the patch and xknown for the find. fixes #5535 for 2.4

git-svn-id: https://develop.svn.wordpress.org/trunk@6496 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-12-26 19:50:26 +00:00
parent 410d3b3b56
commit 5709654d4b
1 changed files with 8 additions and 0 deletions

View File

@ -1535,7 +1535,15 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
}
$this_user = set_current_user( 0, $user_login );
foreach ($posts_list as $entry) {
if (
!empty( $entry['post_password'] )
&& !current_user_can( 'edit_post', $entry['ID'] )
) {
unset( $entry['post_password'] );
}
$post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
$post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt']);