WordPress.org

Make WordPress Core

Changeset 20351


Ignore:
Timestamp:
04/04/2012 08:11:21 PM (6 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r20323 r20351  
    36163616                    break;
    36173617            }
     3618            $author = get_userdata( $content_struct['wp_author_id'] );
     3619            if ( ! $author )
     3620                return new IXR_Error( 404, __( 'Invalid author ID.' ) );
    36183621            $post_author = $content_struct['wp_author_id'];
    36193622        }
Note: See TracChangeset for help on using the changeset viewer.