wordpress-develop icon indicating copy to clipboard operation
wordpress-develop copied to clipboard

Harden REST request parameter sanitization

Open asmitha-16 opened this issue 1 week ago • 3 comments

This PR improves defensive handling in WP_REST_Request::sanitize_params() by validating parameter types before applying sanitize callbacks.

Benefits:

  • Prevents PHP warnings on malformed or unexpected input
  • Ensures arrays are sanitized item-by-item
  • Improves data integrity for REST API requests
  • Aligns with secure coding practices in WordPress core

asmitha-16 avatar Jan 12 '26 16:01 asmitha-16