[wp-trac] [WordPress Trac] #64183: Mixed attachment permission when two posts are using it

WordPress Trac noreply at wordpress.org
Mon Nov 24 19:10:41 UTC 2025


#64183: Mixed attachment permission when two posts are using it
--------------------------------------+------------------------------
 Reporter:  bor0                      |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  REST API                  |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+------------------------------

Comment (by johnjamesjacoby):

 What a funny thing.

 Patch looks good to me, and still applies cleanly to trunk at this time.

 > The published post should not expose the attachment via _embed if it
 inherits access restrictions from a draft parent. Alternatively, the media
 endpoint should not return `401` if it is embedded in a public post.

 I can see how this could go either way, but I think I prefer the approach
 in your patch, unless or until a compelling reason to open it up reveals
 itself.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64183#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list