🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix: reject bad methods on api/public/signup route (#15670)
Steffen Schmitz8656aba59cbb
diff --git a/web/src/features/auth-credentials/server/signupApiHandler.ts b/web/src/features/auth-credentials/server/signupApiHandler.tsindex 371096a70e..e3da5cc291 100644--- a/web/src/features/auth-credentials/server/signupApiHandler.ts+++ b/web/src/features/auth-credentials/server/signupApiHandler.ts@@ -60,7 +60,9 @@ export async function signupApiHandler(req: NextApiRequest,res: NextApiResponse,) {- if (req.method !== "POST") return;+ if (req.method !== "POST") {+ return res.status(405).json({ message: "Method not allowed" });+ }// Block direct signup when email verification is requiredif (isEmailVerificationRequired()) {diff --git a/web/src/pages/api/auth/check-sso.ts b/web/src/pages/api/auth/check-sso.tsindex c6bbd1e2b8..9e71c12b8a 100644--- a/web/src/pages/api/auth/check-sso.ts+++ b/web/src/pages/api/auth/check-sso.ts@@ -16,8 +16,9 @@ export default async function handler(req: NextApiRequest,res: NextApiResponse,) {- if (req.method !== "POST")+ if (req.method !== "POST") {return res.status(405).json({ message: "Method not allowed" });+ }const validBody = requestSchema.safeParse(req.body);if (!validBody.success) {