[wp-trac] [WordPress Trac] #41269: AJAX hook URL returns 200 when bad/missing action

WordPress Trac noreply at wordpress.org
Sat Jul 8 18:48:27 UTC 2017


#41269: AJAX hook URL returns 200 when bad/missing action
--------------------------+------------------------------
 Reporter:  ryanrolds     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Plugins       |     Version:  4.8
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by ayeshrajans):

 Hi @ryanrolds. I'm not a core maintainer and I hope one of them will reply
 to this ticket soon. I also think an appropriate error response code makes
 sense.

 I went ahead and made some changes so that invalid/forged `admin-ajax.php`
 requests die with a `400` error code. It will still print `0` to the
 screen (for compatibility).

 Attaching patch. Link to tests: https://travis-ci.org/Ayesh/wordpress-
 develop/builds/251540542

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


More information about the wp-trac mailing list