Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
render_message: Fix missing content length limit.
Aman Agrawal31773c77c501
diff --git a/zerver/views/message_send.py b/zerver/views/message_send.pyindex 46076060c34..dfbb8dd3629 100644--- a/zerver/views/message_send.py+++ b/zerver/views/message_send.py@@ -3,11 +3,12 @@ from dataclasses import asdictfrom email.headerregistry import Addressfrom typing import Annotated, Literal, cast+from django.conf import settingsfrom django.core import validatorsfrom django.core.exceptions import ValidationErrorfrom django.http import HttpRequest, HttpResponsefrom django.utils.translation import gettext as _-from pydantic import Json+from pydantic import Json, StringConstraintsfrom zerver.actions.message_send import (check_send_message,@@ -256,7 +257,7 @@ def render_message_backend(request: HttpRequest,user_profile: UserProfile,*,- content: str,+ content: Annotated[str, StringConstraints(max_length=settings.MAX_MESSAGE_LENGTH)],) -> HttpResponse:message = Message()message.sender = user_profile