summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/CGI.pl b/CGI.pl
index f91cbd670..0882a967c 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -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.
#