[wp-trac] [WordPress Trac] #39806: Disable REST API by default, making it opt-in rather than always-on

WordPress Trac noreply at wordpress.org
Tue Feb 7 20:07:53 UTC 2017


#39806: Disable REST API by default, making it opt-in rather than always-on
-------------------------+------------------------------
 Reporter:  mor10        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  REST API     |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  close        |     Focuses:
-------------------------+------------------------------

Comment (by GunGeekATX):

 Replying to [comment:7 jnylen0]:
 > Replying to [comment:6 lukecavanagh]:
 > > Another plugin which adds that option to disable, as well as removing
 endpoints is https://wordpress.org/plugins/rest-api-toolbox/
 >
 > This plugin appears to be at least partially broken:
 https://plugins.trac.wordpress.org/browser/rest-api-toolbox/trunk/includes
 /class-rest-api-toolbox-common.php?rev=1574456&marks=113#L106
 >
 > Under normal (unauthenticated) usage, `$error` will be `null`, so the
 code to restrict the API will never run.

 Thanks, I'll take a look at that.  It appears to be working,
 http://baconmockup.com/wp-json and the various wp/v2 endpoints all show
 that the API is disabled, but I see that core is passing null, so I'll add
 some updates to check for this.

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


More information about the wp-trac mailing list