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:
parent
410d3b3b56
commit
5709654d4b
@ -1535,7 +1535,15 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
return $this->error;
|
return $this->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this_user = set_current_user( 0, $user_login );
|
||||||
|
|
||||||
foreach ($posts_list as $entry) {
|
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 = mysql2date('Ymd\TH:i:s', $entry['post_date']);
|
||||||
$post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt']);
|
$post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt']);
|
||||||
|
Loading…
Reference in New Issue
Block a user