diff options
author | myk%mozilla.org <> | 2002-03-11 16:33:03 +0100 |
---|---|---|
committer | myk%mozilla.org <> | 2002-03-11 16:33:03 +0100 |
commit | 0930c074fa7d8dabed00af2ba39a177a8d00167f (patch) | |
tree | 7da1e3717b8e0a3c60470c9aaa15a496c81acb3d /CGI.pl | |
parent | 861379aee83b8b2da5e6247dc3462847b3e127b2 (diff) | |
download | bugzilla-0930c074fa7d8dabed00af2ba39a177a8d00167f.tar.gz bugzilla-0930c074fa7d8dabed00af2ba39a177a8d00167f.tar.xz |
Fix for bug 72184: prevents users from entering too-large comments/descriptions that get rejected by MySQL's MAX_PACKET_SIZE restrictions.
Patch by Myk Melez <myk@mozilla.org>.
r=bbaetz,gerv
Diffstat (limited to 'CGI.pl')
-rw-r--r-- | CGI.pl | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -324,6 +324,19 @@ sub ValidateBugID { } + +sub ValidateComment { + # Make sure a comment is not too large (greater than 64K). + + my ($comment) = @_; + + if (defined($comment) && length($comment) > 65535) { + DisplayError("Comments cannot be longer than 65,535 characters."); + exit; + } +} + + # check and see if a given string actually represents a positive # integer, and abort if not. # |