[wp-trac] [WordPress Trac] #27447: 'XML-RPC server accepts POST requests only.' returned by xml-rpc.php while doing_wp_cron.

WordPress Trac noreply at wordpress.org
Thu Sep 11 15:12:31 UTC 2014


#27447: 'XML-RPC server accepts POST requests only.' returned by xml-rpc.php while
doing_wp_cron.
--------------------------+-----------------------------
 Reporter:  sduval        |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.1
Component:  XML-RPC       |     Version:  3.8.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------------
Changes (by nacin):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I think switching to SERVER_METHOD is probably a bit better here. `$_POST`
 is fine when we want to be naïve, but this case shows we need to expect
 that people will sometimes use raw POST data. php://input isn't re-
 readable until PHP 5.6 and that's overkill anyway. If we're receiving POST
 data, then it has to be a POST method. (The reverse isn't true: you can
 still receive query variables that get parsed into `$_GET` in a POST
 request.)

 Checking XMLRPC_REQUEST is fine, but we should probably do a direct method
 check instead.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27447#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list