Roundcube Community Forum
Release Support => Pending Issues => Topic started by: manub71 on August 24, 2023, 01:04:21 PM
-
Hello,
I'm using last stable version (1.6.2). I can't open some PDF attachment... not all, only in few mails... I don't understand why. On Thunderbird, the mail is ok and I can open or save attachment. But on roundcube, when i open the file, I see en alert box :
This attachment is suspicious because its type doesn't match the type declared in the message. If you do not trust the sender, you shouldn't open it in the browser because it may contain malicious contents.
Expected: application/pdf (.pdf); found: application/x-empty
If i click on "Show it anyway", the PDF reader open an emty file. If i click on properties, the name of the file is ok, type is application/pdf and size ~116 KB. It seems ok... but if i click on download, the file is also empty (0kb). I have complete confidence in the provenance of the file. And the file work perfectly when i open it from Thunderbird.
Any idea ?
Thanks
-
That may happen if the IMAP server returns empty result in FETCH request or the file is malformed in some way. You can try with $config['imap_disabled_caps'] = ['BINARY'];
-
yes, it's possible that the PDF is not perfectly formed because it's a file generated in PHP by an automatic notification service (but I do not have the possibility to control this PHP code).
Anyway, this config 'imap_disabled_caps' solved the problem nicely.
Thanks a lot.