v1.1.3
Released: 2026-10-20. PHP minimum: 8.1.
Ownership authorization security fix
OwnedResourcePolicy now authorizes the same URL-captured object ID that the
Resource handler operates on. In affected earlier versions, a conflicting query
or body ID could select an owned authorization object while the URL selected a
different object. Impact depends on repository and policy configuration, particularly
custom-table detail, update and delete routes.
Applications using this policy should upgrade to 1.1.3 or 2.0.0. The patch preserves PHP 8.1/8.2 compatibility and introduces no database migration or constructor change.
composer require better-route/better-route:^1.1.3
composer check-platform-reqs
Custom policies still need to derive the target from $request->get_url_params()['id']
and validate the ID before performing ownership lookups. Merged get_param('id')
is not a safe source for a URL-bound authorization decision. Keep native authentication,
field/action permissions and list-query ownership restrictions in place.
Verification
- PHPUnit: 231 tests and 733 assertions.
- Quality CI: PHP 8.1, 8.2, 8.3 and 8.4.
- Native WordPress REST ownership smoke: 48 assertions per PHP runtime, including query, form and JSON collisions for GET, PUT, PATCH and DELETE.
- Native WP 6.9.4 / WooCommerce 10.9.4 service, Analytics and wire-schema checks on PHP 8.1/8.3 in HPOS and CPT modes.
These checks cover the tested library fixtures. Consumer policies and deployments need their own integration checks. Version 2.0 adds the PHP 8.3 requirement and language-level hardening while retaining this security fix.