From f4c760de689ee94ad4de415bd341e092809cd769 Mon Sep 17 00:00:00 2001 From: TzeMingHo Date: Thu, 11 Jun 2026 13:00:14 +0100 Subject: [PATCH] added content len check in endpoints.py --- backend/endpoints.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backend/endpoints.py b/backend/endpoints.py index 0e177a07..62e25968 100644 --- a/backend/endpoints.py +++ b/backend/endpoints.py @@ -155,6 +155,17 @@ def send_bloom(): type_check_error = verify_request_fields({"content": str}) if type_check_error is not None: return type_check_error + + bloom_content = request.json["content"] + + if len(bloom_content) > 280: + return make_response( + jsonify({ + "success": False, + "message": "Bloom content cannot exceed 280 characters" + }), + 400 + ) user = get_current_user()