Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: parse request
Marc Seitzc4464e90caaa
diff --git a/app/(ee)/api/auth/saml/authorize/route.ts b/app/(ee)/api/auth/saml/authorize/route.tsindex 31ff2d28..3676885b 100644--- a/app/(ee)/api/auth/saml/authorize/route.ts+++ b/app/(ee)/api/auth/saml/authorize/route.ts@@ -39,7 +39,16 @@ export async function POST(req: Request) {try {const { oauthController } = await jackson();- const body = await req.json();+ const contentType = req.headers.get("content-type") || "";++ let body: Record<string, any>;++ if (contentType.includes("application/x-www-form-urlencoded")) {+ const formData = await req.formData();+ body = Object.fromEntries(formData.entries());+ } else {+ body = await req.json();+ }const { redirect_url, authorize_form } =await oauthController.authorize(body);