From 031dc714eb92f3dcf1890525a4943c67b71e5b22 Mon Sep 17 00:00:00 2001 From: "MSI\\ModSetter" Date: Tue, 14 Oct 2025 17:03:38 -0700 Subject: [PATCH] chore: fixed validators --- surfsense_backend/app/utils/validators.py | 7 +------ surfsense_web/components/homepage/navbar.tsx | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/surfsense_backend/app/utils/validators.py b/surfsense_backend/app/utils/validators.py index 0d6bd5341..c23ca8543 100644 --- a/surfsense_backend/app/utils/validators.py +++ b/surfsense_backend/app/utils/validators.py @@ -295,13 +295,8 @@ def validate_messages(messages: Any) -> list[dict]: status_code=400, detail=f"messages[{i}].content cannot be empty" ) - # Trim content and enforce max length (10,000 chars) + # Trim content sanitized_content = content.strip() - if len(sanitized_content) > 10000: # Reasonable limit - raise HTTPException( - status_code=400, - detail=f"messages[{i}].content is too long (max 10000 characters)", - ) validated_messages.append({"role": role, "content": sanitized_content}) diff --git a/surfsense_web/components/homepage/navbar.tsx b/surfsense_web/components/homepage/navbar.tsx index 8b2041c3b..1be8abad7 100644 --- a/surfsense_web/components/homepage/navbar.tsx +++ b/surfsense_web/components/homepage/navbar.tsx @@ -161,7 +161,7 @@ const MobileNav = ({ navItems, isScrolled }: any) => { > - 8.3k + 9.5k