From 3273cfed1222bab69afc96418926c8af2460e910 Mon Sep 17 00:00:00 2001 From: Andy Janata Date: Mon, 12 Mar 2012 21:05:57 -0700 Subject: [PATCH] make server-side check for no-content chat messages too --- src/net/socialgamer/cah/handlers/ChatHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net/socialgamer/cah/handlers/ChatHandler.java b/src/net/socialgamer/cah/handlers/ChatHandler.java index fbaa146..9c166fb 100644 --- a/src/net/socialgamer/cah/handlers/ChatHandler.java +++ b/src/net/socialgamer/cah/handlers/ChatHandler.java @@ -73,6 +73,8 @@ public class ChatHandler extends Handler { final String message = request.getParameter(AjaxRequest.MESSAGE).trim(); if (message.length() > 200) { return error(ErrorCode.MESSAGE_TOO_LONG); + } else if (message.length() == 0) { + return error(ErrorCode.NO_MSG_SPECIFIED); } else { final HashMap broadcastData = new HashMap(); broadcastData.put(LongPollResponse.EVENT, LongPollEvent.CHAT.toString());