From 97580f108b61e514989065858450de8ca63e52c3 Mon Sep 17 00:00:00 2001 From: timb Date: Fri, 12 Mar 2010 05:58:52 -0800 Subject: prevent huge messages from sending (client side block only) --- static/js/pichat.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'static/js') diff --git a/static/js/pichat.js b/static/js/pichat.js index 7314ff8..1a0f1df 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -121,6 +121,10 @@ function submitMessage() { var content = $.trim($('#msgInput').val()); $('#msgInput').val(''); if (content == '') { return; } + if (content.length > 6666) { + alert("POST TOO LONG DUDE!"); + return; + } // this shouldn't just be client side :V PendingMessages[content] = true; var msg = { 'nick': Nick, 'content': content }; -- cgit v1.2.3-70-g09d2