ddkdimitrov / php-mime-mail-parser

Automatically exported from code.google.com/p/php-mime-mail-parser
0 stars 0 forks source link

Plain text attachments have random string added to the end #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Send txt/csv (possibly other files are also affected)

What is the expected output? What do you see instead?
Random string is added to the last line, all look similar to this: 
´qýôï†øÎ\çvÝÓ‡vq¦Ù

Using r25 on ubuntu 12.10, php5.3

Original issue reported on code.google.com by andrew....@gmail.com on 8 Jan 2013 at 6:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I can confirm this problem but from what I've learned it depends not on type of 
attachment but its size.

If attached file together with headers and body will be small enough - 
attachment will get extra characters appended at the end.

I've attached 1400.txt file which is full email I was using to reproduce the 
problem.

Good news is that I was also able to debug and fix this issue so I'm attaching 
also a patch against

Original comment by lukasz.w...@gmail.com on 26 Feb 2013 at 6:35

Attachments:

GoogleCodeExporter commented 9 years ago
Awesome thanks!

Original comment by andrew....@gmail.com on 26 Feb 2013 at 6:37

GoogleCodeExporter commented 9 years ago
I just noticed that this bug was already reported a long time ago.
http://code.google.com/p/php-mime-mail-parser/issues/detail?id=7

You should take a look on it as it reveals another problem with decode being 
called on partial data.

After all I guess that my fix could be not enough. I will go with approach 
proposed by Adrian: 
http://code.google.com/p/php-mime-mail-parser/issues/detail?id=7#c7

Original comment by lukasz.w...@gmail.com on 26 Feb 2013 at 6:44

GoogleCodeExporter commented 9 years ago
This issue is reproduced, corrected and tested 
(https://github.com/eXorus/php-mime-mail-parser/issues/2)

You could use my fork if you want : 
https://github.com/eXorus/php-mime-mail-parser

Original comment by eXorus.m...@gmail.com on 28 Jul 2013 at 7:20