summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2011-12-08 13:47:39 +0100
committerGervase Markham <gerv@mozilla.org>2011-12-08 13:47:39 +0100
commita4599dde03c31fec1000c8358d6daa04e1801139 (patch)
tree1f01c6e68f1989ab15b782cf1fe388d049ca6389 /Bugzilla/Attachment.pm
parent4badf488d539d7e50c7a156ecc65514796e6345a (diff)
downloadbugzilla-a4599dde03c31fec1000c8358d6daa04e1801139.tar.gz
bugzilla-a4599dde03c31fec1000c8358d6daa04e1801139.tar.xz
Expand max length of attachment filename from 100 to 255 characters. r=glob, a=LpSolit.
https://bugzilla.mozilla.org/show_bug.cgi?id=705078
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm8
1 files changed, 5 insertions, 3 deletions
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;