[wp-trac] [WordPress Trac] #38977: REST API: `password` is incorrectly included in arguments to get a media item
WordPress Trac
noreply at wordpress.org
Thu Dec 1 20:27:41 UTC 2016
#38977: REST API: `password` is incorrectly included in arguments to get a media
item
---------------------------------------------------+--------------------
Reporter: jnylen0 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: REST API | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests dev-feedback | Focuses:
---------------------------------------------------+--------------------
Comment (by jnylen0):
Replying to [comment:7 rachelbaker]:
> I am concerned about the potential performance impact of reloading the
schema.
Worth noting that we're already grabbing the schema twice for each post
type during route registration (via `get_endpoint_args_for_item_schema`
for create and edit).
> We *could* special case attachment, but then shouldn't we also special
case the `nav_menu_item` post type when adding Menu endpoints in the
future?
Agreed I don't much like the idea of special casing here either.
> Seems like, ideally, we would want to use something like a
`post_type_supports()` conditional within the schema. Which is a bigger
fix than we can get into 4.7
There's no `post_type_supports` for passwords, it's odd like that.
> which brings me to question "is anything broken here?"
I think so, we have an argument that does nothing for no clear reason. If
we leave it in place for 4.7, are we saying that it should be left in
place for future releases also?
> @jnylen0 @helen I recommend moving this ticket out of the 4.7 milestone,
and into 4.8 so it can be addressed thoroughly.
I would prefer that we go with the fix in [attachment:38977.diff] for 4.7
and get the interface behaving as expected, then we can circle back around
to a more complete and performant fix in 4.8.
In any case, I would not like to move this out of 4.7 unless we can go
ahead and decide that we will definitely fix it in 4.8.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38977#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list