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-07 11:38:33 +02:00
2026-07-03 16:56:03 +00:00
2026-07-03 16:56:03 +00:00
2026-07-03 16:56:03 +00:00
2026-08-02 16:21:50 +02:00
2026-08-02 16:21:50 +02:00
2026-08-18 09:44:49 +02:00
2026-08-18 09:44:49 +02:00
2026-07-19 18:59:34 +02:00
2026-08-19 13:01:59 +02:00
2026-07-28 06:59:04 +00:00
2026-08-04 13:40:11 +02:00
2026-08-04 13:40:11 +02:00
2026-08-02 16:21:50 +02:00
2026-08-02 16:21:50 +02:00
2026-07-18 13:41:15 +00:00
2026-08-02 16:21:50 +02:00
2026-08-02 16:21:50 +02:00
2026-08-16 17:57:52 +02:00
2026-08-16 17:57:52 +02:00
2026-07-03 23:18:00 +02:00
2026-08-02 16:21:50 +02:00
2026-08-04 01:09:10 +02:00
2026-07-30 12:03:30 +02:00
2026-07-30 12:03:30 +02:00
2026-07-07 11:57:04 +00:00
2026-07-30 12:03:30 +02:00
2026-08-04 13:40:11 +02:00
2026-08-04 13:40:11 +02:00
2026-08-02 16:21:50 +02:00
2026-08-18 16:38:00 +00:00
2026-07-07 11:38:33 +02:00
2026-07-29 07:58:17 +00:00
2026-07-29 07:58:17 +00:00
2026-07-29 07:58:17 +00:00
2026-07-29 07:58:17 +00:00
2026-07-29 07:58:17 +00:00
2026-08-18 16:38:00 +00:00
2026-07-29 07:58:17 +00:00
2026-06-29 17:18:05 +02:00
2026-06-19 10:15:58 +02:00
2026-08-16 17:57:52 +02:00
2026-07-26 09:39:41 +00:00
2026-07-29 07:33:35 +00:00
2026-07-19 18:59:34 +02:00
2026-07-19 18:59:34 +02:00
2026-07-29 22:53:46 +02:00
2026-08-18 14:28:37 +02:00
2026-06-18 20:57:05 +00:00
2026-07-19 18:59:34 +02:00
2026-08-04 01:09:10 +02:00
2026-08-04 01:09:10 +02:00
2026-08-18 14:28:37 +02:00
2026-07-19 18:59:34 +02:00
2026-08-02 16:21:50 +02:00
2026-08-04 13:40:11 +02:00
2026-08-04 13:40:11 +02:00
2026-07-19 18:59:34 +02:00
2026-07-29 07:33:35 +00:00
2026-07-29 22:28:31 +02:00
2026-06-18 20:57:05 +00:00
2026-06-18 20:57:05 +00:00
2026-08-16 17:57:52 +02:00
2026-08-16 17:57:52 +02:00
2026-07-28 23:41:49 +02:00
2026-07-28 23:41:49 +02:00
2026-07-06 15:45:55 +00:00
2026-07-30 12:03:30 +02:00
2026-07-19 18:59:34 +02:00
2026-08-04 13:40:11 +02:00
2026-06-12 08:56:08 +00:00
2026-07-07 11:57:04 +00:00
2026-07-07 11:57:04 +00:00
2026-08-16 17:57:52 +02:00
2026-07-03 19:58:39 +02:00
2026-08-02 16:21:50 +02:00
2026-08-18 16:38:00 +00:00
2026-08-18 16:38:00 +00:00
2026-06-17 21:16:41 +00:00
2026-07-06 15:45:55 +00:00
2026-07-19 14:16:07 +00:00
2026-07-19 18:59:34 +02:00
2026-08-18 19:01:05 +02:00
2026-08-18 19:01:05 +02:00
2026-08-04 13:40:11 +02:00
2026-06-18 20:57:05 +00:00
2026-08-04 13:40:11 +02:00
2026-06-18 20:57:05 +00:00
2026-07-07 11:38:33 +02:00
2026-06-12 08:56:08 +00:00
2026-07-29 07:33:35 +00:00
2026-07-19 18:59:34 +02:00
2026-07-19 18:59:34 +02:00
2026-07-02 19:39:00 +02:00
2026-06-18 20:57:05 +00:00
2026-08-04 13:40:11 +02:00
2026-07-28 17:25:57 +02:00
2026-08-04 13:40:11 +02:00