From a4599dde03c31fec1000c8358d6daa04e1801139 Mon Sep 17 00:00:00 2001 From: Gervase Markham Date: Thu, 8 Dec 2011 12:47:39 +0000 Subject: Expand max length of attachment filename from 100 to 255 characters. r=glob, a=LpSolit. https://bugzilla.mozilla.org/show_bug.cgi?id=705078 --- Bugzilla/Attachment.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Attachment.pm') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 6c39818f6..53a3e9147 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -581,9 +581,11 @@ sub _check_filename { # a big deal if it munges incorrectly occasionally. $filename =~ s/^.*[\/\\]//; - # Truncate the filename to 100 characters, counting from the end of the - # string to make sure we keep the filename extension. - $filename = substr($filename, -100, 100); + # Truncate the filename to MAX_ATTACH_FILENAME_LENGTH characters, counting + # from the end of the string to make sure we keep the filename extension. + $filename = substr($filename, + -MAX_ATTACH_FILENAME_LENGTH, + MAX_ATTACH_FILENAME_LENGTH); trick_taint($filename); return $filename; -- cgit v1.2.3-24-g4f1b