From bd977e3c791dd5d71112757a48b5fdbe995602f2 Mon Sep 17 00:00:00 2001 From: David Croft Date: Sun, 19 Jul 2026 21:28:23 +1000 Subject: [PATCH] refactor(scim): use shared SCIM body-limit constant in main Reference api::scim::SCIM_BODY_LIMIT when registering the rocket "scim" data limit so it stays in sync with the fallback in the ScimJson data guard. Co-Authored-By: Claude Fable 5 --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 20cd7baf..7b05ee53 100644 --- a/src/main.rs +++ b/src/main.rs @@ -578,7 +578,7 @@ async fn launch_rocket(pool: db::DbPool, extra_debug: bool) -> Result<(), Error> .limit("json", 20.megabytes()) // 20MB should be enough for very large imports, something like 5000+ vault entries .limit("data-form", 525.megabytes()) // This needs to match the maximum allowed file size for Send .limit("file", 525.megabytes()) // This needs to match the maximum allowed file size for attachments - .limit("scim", 512.kibibytes()); // SCIM bodies are small; a tight cap limits abuse of the machine-auth endpoint + .limit("scim", api::scim::SCIM_BODY_LIMIT); // SCIM bodies are small; a tight cap limits abuse of the machine-auth endpoint // If adding more paths here, consider also adding them to // crate::utils::LOGGED_ROUTES to make sure they appear in the log