[wp-trac] [WordPress Trac] #42004: Standardise api.wordpress.org requests

WordPress Trac noreply at wordpress.org
Thu Sep 28 01:24:35 UTC 2017


#42004: Standardise api.wordpress.org requests
-----------------------------+---------------------
 Reporter:  dd32             |       Owner:  dd32
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:  4.9
Component:  Upgrade/Install  |     Version:
 Severity:  normal           |  Resolution:  fixed
 Keywords:                   |     Focuses:
-----------------------------+---------------------

Comment (by dd32):

 Replying to [comment:3 johnbillion]:
 > 1. Should this be backported to older branches?

 The SSL stuff could be backported, as it's a hardening/consistency change
 rather than a security focus I wasn't planning to. It may make sense to
 backport it in the future if we make any future security changes which
 relate to it.

 > 2. Should `network_home_url()` be used in the user agent instead of
 `home_url()` to improve consistency of calls coming from a Multisite
 installation?

 Quite possibly, however the Core/Plugin/Theme checks are only run on the
 main site of a network, and all the other calls are mostly irrelevant to
 server-side stats as they're so sporadic and on-demand.
 I don't see any urgent need to make those requests super consistent, just
 as long as they're consistently requesting over SSL with a valid version
 number - the URL in that case mostly allows for simpler differentiation
 between any two requests, so it doesn't really matter what it is, just as
 long as it's consistent for any given request type.

 If all these calls went through a central wrapper which dealt with HTTP
 fallback & user-agent setting/etc I'd agree that `network_home_url()`
 would be a better choice here, given the number of locations in Core we do
 api.wordpress.org requests (It surprised me honestly) that would probably
 be a wise enhancement for future maintainability.

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


More information about the wp-trac mailing list