diff options
author | Koosha Khajeh Moogahi <koosha.khajeh@gmail.com> | 2012-08-18 19:06:44 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-08-18 19:06:44 +0200 |
commit | c6c54c2e4235783544c44c08e4e55d4057556588 (patch) | |
tree | 2014f444a3de707c4aa47ddbd29aa77347c54500 /quips.cgi | |
parent | ca3d59070b8e470c3c82399f62e8b801db043e89 (diff) | |
download | bugzilla-c6c54c2e4235783544c44c08e4e55d4057556588.tar.gz bugzilla-c6c54c2e4235783544c44c08e4e55d4057556588.tar.xz |
Bug 187753: Specify a maximum length for quips (512 characters)
r/a=LpSolit
Diffstat (limited to 'quips.cgi')
-rwxr-xr-x | quips.cgi | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 (?, ?, ?)", |