diff --git a/api/src/Mail.php b/api/src/Mail.php index 2860d3cecb..5f2cd94a84 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -6448,7 +6448,7 @@ class Mail static function clean_subject_for_filename($filename) { static $filter_pattern = '$[\f\n\t\x0b\:*#?<>%"\|/\x{10000}-\x{10FFFF}\\\\]$u'; - $file = trim(preg_replace($filter_pattern, ' ', $filename)); + $file = substr(trim(preg_replace($filter_pattern, ' ', $filename)), 0, 200); if (empty($file)) $file = lang('empty'); return $file; }