[wp-trac] [WordPress Trac] #56221: Add download URL to plugins REST create (install) endpoint
WordPress Trac
noreply at wordpress.org
Sat Oct 22 06:44:29 UTC 2022
#56221: Add download URL to plugins REST create (install) endpoint
-------------------------------------+-------------------------------------
Reporter: brianhenryie | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 5.5
Severity: normal | Resolution:
Keywords: needs-testing has-unit- | Focuses: administration, rest-
tests has-patch dev-feedback | api
-------------------------------------+-------------------------------------
Comment (by brianhenryie):
Now I think more... in WP_REST_Plugins_Controller::create_item where I
have `if ( isset( $request['url'] ) ) {` ... `else`, it should be an
`elseif ( isset( $request['slug'] ) ) {` followed by something like `}
else { $response = new WP_REST_Response( null, 400 );`
I hadn't realised that was another avenue into the REST input validation.
I'll have a think about it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56221#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list