Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#41738 closed defect (bug) (fixed)

Customize: Potential cache corruption when finding changeset post by UUID

Reported by: dlh Owned by: westonruter
Priority: normal Milestone: 4.9
Component: Customize Version: 4.7
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

WP_Customize_Manager::find_changeset_post_id() accepts any $uuid, but it uses the UUID assigned to the manager as the key when caching the found post ID.

The attached patch updates the tests for find_changeset_post_id() to demonstrate the issue and includes a fix.

Note that it would also be possible to fix this bug as part of #40527, for which I almost have a patch. But I'm filing this ticket separately in case #40527 doesn't happen as soon as planned for whatever reason.

Attachments (1)

41738.diff​ (1.3 KB ) - added by dlh 9 years ago.

Download all attachments as: .zip

Change History (3)

#1 @westonruter
9 years ago

  • Keywords has-unit-tests added
  • Milestone Awaiting Review → 4.9
  • Owner set to westonruter
  • Status new → accepted

#2 @westonruter
9 years ago

  • Resolution → fixed
  • Status accepted → closed

In 41321:

Customize: Prevent potential cache corruption when finding a secondary changeset post by UUID.

Props dlh.
Fixes #41738.

Note: See TracTickets for help on using tickets.