Make WordPress Core

Opened 5 weeks ago

Last modified 4 weeks ago

#61055 new defect (bug)

wp_update_plugins irregular transient handling.

Reported by: cybr's profile Cybr Owned by:
Milestone: 6.6 Priority: normal
Severity: normal Version: trunk
Component: Plugins Keywords:
Focuses: Cc:


When creating $updates in wp_update_plugins(), its properties are populated immediately.

However, one property is missing, which is used later: checked.

When hooking into pre_set_site_transient_update_plugins, the checked property will be available sporadically because of this, depending on whether the $time_not_changed && ! $extra_stats branch is executed or not.

Another noteworthy issue with this function is that its implementation of set_site_transient( 'update_plugins', ... ); uses both the values $current and $updates. They store different objects at different times (1, 2).

Prepopulating both values with the same object properties would help prevent object-typing issues.

Change History (2)

#2 @SergeyBiryukov
4 weeks ago

  • Component changed from General to Plugins
  • Milestone changed from Awaiting Review to 6.6
Note: See TracTickets for help on using tickets.