kolaente
e007a1da70
fix(api/v2): don't require read_one for autopatch's internal GET
...
Huma's AutoPatch implements PATCH as an internal GET + PUT re-dispatched through
the router, so both legs re-enter the API token middleware. Scoping the GET leg
like a client request made every /api/v2 PATCH additionally demand the
resource's read_one permission, so a token scoped to tasks: update could never
patch a task.
Mark the re-dispatched requests with the route the client request was matched
against, and skip the scope check only for a GET leg that carries no query
string and resolves to that exact route. Anything looser is exploitable: echo
routes on the raw path while autopatch re-dispatches the decoded one, so an
encoded slash steers the unchecked leg onto a deeper route and an encoded
question mark smuggles a query onto it.
Fixes #3528
2026-08-19 13:01:59 +02:00
..
2026-07-03 16:56:03 +00:00
2026-07-18 10:00:37 +02:00
2026-07-28 06:59:04 +00:00
2026-07-30 11:32:24 +02:00
2026-07-10 17:52:01 +02:00
2026-07-03 16:56:03 +00:00
2026-08-19 13:01:59 +02:00
2026-08-19 13:01:59 +02:00
2026-06-05 07:40:07 +00:00
2026-07-28 17:25:37 +02:00
2026-06-17 20:34:38 +00:00
2026-08-18 17:08:10 +00:00
2026-06-03 19:58:27 +00:00
2026-06-17 11:31:50 +00:00
2026-06-11 20:07:43 +00:00
2026-06-12 08:47:08 +00:00
2026-06-05 08:51:39 +00:00
2026-06-26 08:56:15 +00:00
2026-06-09 20:13:02 +00:00
2026-06-10 17:55:52 +00:00
2026-07-28 19:26:15 +02:00
2026-06-19 14:19:19 +00:00
2026-06-10 11:56:05 +02:00
2026-07-30 12:03:30 +02:00
2026-07-30 12:03:30 +02:00
2026-06-05 09:17:25 +00:00
2026-06-12 08:51:19 +00:00
2026-06-12 08:51:19 +00:00
2026-06-11 18:35:55 +00:00
2026-06-17 20:35:28 +00:00
2026-07-29 07:58:17 +00:00
2026-06-07 10:05:24 +00:00
2026-07-19 18:59:34 +02:00
2026-06-07 15:33:20 +00:00
2026-06-06 21:09:56 +00:00
2026-06-07 10:37:59 +00:00
2026-07-19 18:59:34 +02:00
2026-07-27 22:31:06 +00:00
2026-06-09 21:34:22 +00:00
2026-06-29 08:12:35 +02:00
2026-06-07 10:40:20 +00:00
2026-06-05 08:21:48 +00:00
2026-06-07 09:57:51 +00:00
2026-06-09 19:42:16 +00:00
2026-06-06 19:06:12 +00:00
2026-07-11 18:53:09 +02:00
2026-07-19 18:59:34 +02:00
2026-08-02 16:21:50 +02:00
2026-06-11 18:31:03 +00:00
2026-06-05 07:43:38 +00:00
2026-06-03 20:29:15 +00:00
2026-07-29 22:28:31 +02:00
2026-06-10 11:55:51 +02:00
2026-06-09 20:42:00 +00:00
2026-07-07 11:38:33 +02:00
2026-06-09 19:50:58 +00:00
2026-06-07 10:48:23 +00:00
2026-06-05 08:06:54 +00:00
2026-06-17 12:13:50 +00:00
2026-06-08 13:54:09 +00:00
2026-07-19 18:59:34 +02:00
2026-06-17 18:39:38 +00:00
2026-06-11 20:07:43 +00:00
2026-08-18 22:03:38 +02:00
2026-06-17 18:39:38 +00:00
2026-06-10 19:12:41 +00:00
2026-06-11 20:07:43 +00:00
2026-06-06 21:09:56 +00:00
2026-06-05 07:40:07 +00:00
2026-07-19 18:59:34 +02:00
2026-07-19 18:59:34 +02:00
2026-08-04 13:40:11 +02:00
2026-06-17 19:43:41 +00:00
2026-07-28 17:13:15 +02:00
2026-07-26 09:39:41 +00:00
2026-07-19 18:59:34 +02:00
2026-08-18 11:30:03 +02:00
2026-07-19 18:59:34 +02:00
2026-08-18 14:01:06 +02:00
2026-08-18 22:03:38 +02:00
2026-07-28 17:12:18 +02:00