Hello,
Describe the bug
Some times, email attached documents wont be uploaded into created tickets.
To reproduce
email attached doc.zip
Steps to reproduce the behavior:
- Send an email to GLPI with the Excel document from the zipped file above.
- Open the receiver, and "get email tickets now"
- Look in the newly created ticket, and you see that the ticket doesn't contain the attached Excel file.
- In the log files, you should find the below errors
Expected behavior
The Excel file should be attached in the ticket as a document
Logs
[2021-01-06 13:22:48] glpiphplog.WARNING: *** PHP Warning (2): file_put_contents(C:\Projects\GLPI\9.5/files/_tmp/=?UTF-8?Q?=E5=8A=9E=E5=85?==?UTF-8?Q?=AC=E7=94=A8=E5?==?UTF-8?Q?=93=81=E9=A2=84?=约Apply for officesupplies online.xlsx): failed to open stream: Illegal byte sequence in C:\Projects\GLPI\9.5\inc\mailcollector.class.php at line 1614
Backtrace :
inc\mailcollector.class.php:1614 file_put_contents()
inc\mailcollector.class.php:1513 MailCollector->getRecursiveAttached()
inc\mailcollector.class.php:1654 MailCollector->getRecursiveAttached()
inc\mailcollector.class.php:989 MailCollector->getAttached()
inc\mailcollector.class.php:750 MailCollector->buildTicket()
front\mailcollector.form.php:88 MailCollector->collect()
It seems like Laminas is retrieving a wrong file name from the email, and of course trying to create a file with a question mark will fail (at least on Windows).
Thank you,
Regards,
Tomolimo
Hello,
Describe the bug
Some times, email attached documents wont be uploaded into created tickets.
To reproduce
email attached doc.zip
Steps to reproduce the behavior:
Expected behavior
The Excel file should be attached in the ticket as a document
Logs
It seems like Laminas is retrieving a wrong file name from the email, and of course trying to create a file with a question mark will fail (at least on Windows).
Thank you,
Regards,
Tomolimo