diff --git a/chat_box/views.py b/chat_box/views.py index 49e5a4d..deffafa 100644 --- a/chat_box/views.py +++ b/chat_box/views.py @@ -120,6 +120,8 @@ def post_message(request): ret = {'msg': 'posted'} if request.method != 'POST': return HttpResponseBadRequest() + if len(request.POST['body']) > 5000: + return HttpResponseBadRequest() room = None if request.POST['room']: diff --git a/templates/chat/chat.html b/templates/chat/chat.html index da0dc96..e1fb66d 100644 --- a/templates/chat/chat.html +++ b/templates/chat/chat.html @@ -614,7 +614,7 @@ let META_HEADER = [