Bugfix ticket system attachments with UTF-8 URL-encoded filenames

This commit is contained in:
Xenomporio 2022-08-14 20:18:15 +02:00
parent f08c9ecc09
commit f3dfd870c2

View File

@ -769,6 +769,12 @@ class TicketImportHelper
$dateiname = $this->formatter->encodeToUtf8($dateiname);
$dateiname = htmlspecialchars_decode($dateiname);
}
if (stripos(strtoupper($dateiname), 'UTF-8\'\'') == 0) {
$dateiname = $this->formatter->encodeToUtf8(urldecode(substr($dateiname,7)));
$dateiname = htmlspecialchars_decode($dateiname);
}
$this->logger->debug("Attachment cleaned", ['filename' => $dateiname]);
if ($DEBUG) {
echo "CreateDatei($dateiname,{$dateiname},\"\",\"\",\"datei\",\"Support Mail\",true,"