Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#20625 closed defect (bug) (fixed)

Attachment editing shouldn't allow you to edit other post types

Reported by: helenyhou's profile helenyhou Owned by: ryan's profile ryan
Milestone: 3.4 Priority: normal
Severity: normal Version: 2.5
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description (last modified by helenyhou)

It is possible to edit a non-attachment post in the media editor by changing the attachment_id in the URL, e.g. to 1. Nothing is particularly broken, but it looks a bit strange.

http://core.trac.wordpress.org/raw-attachment/ticket/20625/attachment-edit-hello-world.png

Attachments (2)

attachment-edit-hello-world.png (34.3 KB) - added by helenyhou 13 years ago.
20625.diff (760 bytes) - added by helenyhou 13 years ago.

Download all attachments as: .zip

Change History (5)

@helenyhou
13 years ago

#1 @helenyhou
13 years ago

  • Description modified (diff)

20625.diff just adds a wp_die() with a brief message, much as it does for trashed items.

(Look everybody, no CSS!)

#2 @nacin
13 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.4

#3 @ryan
13 years ago

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

In [20753]:

Restrict the media editor to posts with the attachment post type. Props helenyhou. fixes #20625

Note: See TracTickets for help on using tickets.