[wp-trac] [WordPress Trac] #41604: REST API: Attempting to create or update a non-existent setting doesn't return an error response

WordPress Trac noreply at wordpress.org
Wed Dec 24 17:58:26 UTC 2025


#41604: REST API: Attempting to create or update a non-existent setting doesn't
return an error response
----------------------------------------+--------------------------
 Reporter:  johnbillion                 |       Owner:  johnbillion
     Type:  defect (bug)                |      Status:  reopened
 Priority:  normal                      |   Milestone:  7.0
Component:  Options, Meta APIs          |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  rest-api
----------------------------------------+--------------------------
Changes (by coderalamin):

 * keywords:  has-patch has-unit-tests => has-patch needs-unit-tests


Comment:

 I've attached a PR that implements strict validation while whitelisting
 infrastructure parameters to avoid the regressions seen in previous
 attempts. Tests have been added to cover empty bodies, unknown params, and
 query string updates.

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


More information about the wp-trac mailing list