Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#20786 closed defect (bug) (fixed)

Cache Race Window When Attaching Attachments to Posts

Reported by: mdawaffe's profile mdawaffe Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.0
Component: Cache API Keywords: has-patch commit
Focuses: Cc:

Description

In wp-admin/upload.php's 'attach' case, there's a cache race window.

I've never encountered a problem, but clean_attachment_cache() should come after the update, not before.

See #11647.

Attachments (1)

20786.diff (859 bytes) - added by mdawaffe 12 years ago.

Download all attachments as: .zip

Change History (5)

@mdawaffe
12 years ago

#1 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.5

#2 follow-up: @nacin
12 years ago

  • Keywords commit added

Or maybe array_map( 'clean_attachment_cache', $attach )? :-)

#3 in reply to: ↑ 2 @mdawaffe
12 years ago

Replying to nacin:

Or maybe array_map( 'clean_attachment_cache', $attach )? :-)

:) WFM.

#4 @nacin
12 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [21605]:

Clean attachment cache after a manual update, not before. props mdawaffe. fixes #20786.

Note: See TracTickets for help on using tickets.