Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winmail.dat attachment causes "An internal error has occurred." error when attempting to view the email message #9462

Closed
stephansfourie opened this issue May 22, 2024 · 3 comments

Comments

@stephansfourie
Copy link

In Roundcube version 1.6.6 a user is attempting to open an email which contains a winmail.dat attachment. They see an "An internal error has occurred." error in the message pane.

The Roundcube logs on the server reports the following:

[22-May-2024 10:02:20 Africa/Johannesburg] PHP Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /opt/roundcubemail-1.6.6/program/lib/Roundcube/rcube_message.php:1108 Stack trace: #0 /opt/roundcubemail-1.6.6/program/lib/Roundcube/rcube_message.php(875): rcube_message->tnef_decode() #1 /opt/roundcubemail-1.6.6/program/lib/Roundcube/rcube_message.php(129): rcube_message->parse_structure() #2 /opt/roundcubemail-1.6.6/program/actions/mail/show.php(63): rcube_message->__construct() #3 /opt/roundcubemail-1.6.6/program/include/rcmail.php(282): rcmail_action_mail_show->run() #4 /opt/roundcubemail-1.6.6/index.php(278): rcmail->action_handler() #5 {main} thrown in /opt/roundcubemail-1.6.6/program/lib/Roundcube/rcube_message.php on line 1108

I've attempted to disable 'tnef_decode' in the config by setting it to 'false' but that didn't help. No other errors are reported in other logs, eg. PHP, Apache etc.

The email opens normally in Thunderbird when downloading it and opening it.

@pabzm
Copy link
Member

pabzm commented May 22, 2024

Can you provide us with the email that triggers this (stripped from personal information)? Or the attachment?

@alecpl
Copy link
Member

alecpl commented Jun 1, 2024

It is related to this change 2521475 and the fact that PHP become stricter.

@alecpl
Copy link
Member

alecpl commented Jun 2, 2024

I suspect that it happens when RTF to HTML conversion fails for any reason. Don't you see also "Failed to extract RTF/HTML content from TNEF attachment" in the log?

I think 6d8dd2c should prevent the fatal error from happening, but to fix the conversion error we'd need a sample message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants