mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:56 +01:00
Limit subjects for filenames to 200 characters to avoid failures
This commit is contained in:
parent
ec9bbf28d3
commit
5d65420a03
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user