Opened 12 months ago

Closed 9 months ago

#20786 closed defect (bug) (fixed)

Cache Race Window When Attaching Attachments to Posts

Reported by: mdawaffe Owned by: nacin
Priority: normal Milestone: 3.5
Component: Cache Version: 3.0
Severity: normal Keywords: has-patch commit
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 months ago.

Download all attachments as: .zip

Change History (5)

  • Milestone changed from Awaiting Review to 3.5

comment:2 follow-up: ↓ 3   nacin9 months ago

  • Keywords commit added

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

comment:3 in reply to: ↑ 2   mdawaffe9 months ago

Replying to nacin:

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

:) WFM.

  • 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.