[wp-trac] [WordPress Trac] #51822: Ensure update-core.php knows you're using a development version

WordPress Trac noreply at wordpress.org
Sun Nov 29 12:14:31 UTC 2020


#51822: Ensure update-core.php knows you're using a development version
-------------------------------------------------+-------------------------
 Reporter:  afragen                              |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.6
Component:  Upgrade/Install                      |     Version:  5.6
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-screenshots commit     |     Focuses:
  dev-feedback                                   |
-------------------------------------------------+-------------------------

Comment (by azaozz):

 Replying to [comment:16 afragen]:
 > This is a consequence of the changes  to the Updates API where if a new
 update is present in `'development' === $updates[0]->response` and other
 offers are listed as `'latest'`.
 > ...
 > The fundamental issue is that the Updates API only shows a
 `'development'` response if an update is available. There is "always" an
 update available when the channel is on development (Nightlies). If no
 update is available then the responses are set to `'latest'`.

 I see, makes sense, thanks for the explanation.

 Another nitpick: There were (still are?) some plugins that "hack" the PHP
 global `$wp_version` as a (questionable) security hardening. For that
 reason few places in core include unmodified $wp_version, see:
 https://core.trac.wordpress.org/browser/tags/5.5.3/src/wp-
 includes/update.php#L33. This also bypasses `apply_filters( 'bloginfo',
 $output, $show );`.

 Thinking perhaps it would be good to do that in `core_upgrade_preamble()`
 as otherwise the changed/filtered WP version would result in wrong UI.

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


More information about the wp-trac mailing list