summaryrefslogtreecommitdiffstats
path: root/quips.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'quips.cgi')
-rwxr-xr-xquips.cgi4
1 files changed, 4 insertions, 0 deletions
diff --git a/quips.cgi b/quips.cgi
index 565056a6e..266ed516f 100755
--- a/quips.cgi
+++ b/quips.cgi
@@ -65,6 +65,10 @@ if ($action eq "add") {
|| $user->in_group('bz_quip_moderators') || 0;
my $comment = $cgi->param("quip");
$comment || ThrowUserError("need_quip");
+
+ ThrowUserError("quip_too_long", { length => length($comment) })
+ if length($comment) > MAX_QUIP_LENGTH;
+
trick_taint($comment); # Used in a placeholder below
$dbh->do("INSERT INTO quips (userid, quip, approved) VALUES (?, ?, ?)",