On Mon, August 26, 2024 6:40 pm, Stefan G wrote: > Hi all, > > I just noticed that SquirrelMail adds a line feed character to files when > downloading attachments. This does not happen when sending attachments. > The attachments are correctly stored on the server: for example in OSX > Mail and iOS Mail there is no problem with the same attachments. The > problem is browser-independent (tested on various OSX and Windows web > browsers). The problem is also independent of the attachment type (except > for plain text attachment, with the exception of plain text attachments. > Since I don't use my webmail often I have no idea when the problem > started; I think somewhere in the first half of this year. The problem > occurs both with the newest version of SquirrelMail and an older version I > tried from 2017, so it probably has to do with some sort of > incompatibility of the code with newer versions of php. > > Software: Debian 11, Dovecot 2.3. 13, php 7.4, SquirrelMail 1.4. 23 SVN. > > Curious if anyone has an idea on how to fix this. It's driving me nuts :). It doesn't occur for text attachments? That might mean the problem is encoding dependent, and would be in the decodeBody() function in mime.php. The code related to downloads has not changed in years, so might be a possible regression in PHP's quoted_printable_decode() or base64_decode() though that also seems unlikely. You should pay attention to how the attachment is encoded (see message headers) and try differently encoded attachments. To narrow it down more, you'd want to follow the code in mime_print_body_lines() in functions/mime.php -- Paul Lesniewski SquirrelMail Team Please support Open Source Software by donating to SquirrelMail! http://squirrelmail.org/donate_paul_lesniewski.php ----- squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users