mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Use more reliable original file names for attachments (#1070)
This commit is contained in:
parent
33faad2355
commit
e1a7630cee
1 changed files with 1 additions and 1 deletions
|
@ -847,7 +847,7 @@ class Attach
|
|||
$this->attach_filename = preg_replace('#([\xC2\xC3])([\x80-\xBF])#', 'chr(ord(\'$1\')<<6&0xC0|ord(\'$2\')&0x3F)', $this->attach_filename);
|
||||
$this->attach_filename = rawurlencode($this->attach_filename);
|
||||
$this->attach_filename = preg_replace("/(%[0-9A-F]{1,2})/i", '', $this->attach_filename);
|
||||
$this->attach_filename = trim($this->attach_filename . time());
|
||||
$this->attach_filename = trim($this->attach_filename . '_' .make_rand_str(13));
|
||||
}
|
||||
$this->attach_filename = str_replace(['&', '&', ' '], '_', $this->attach_filename);
|
||||
$this->attach_filename = str_replace('php', '_php_', $this->attach_filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue