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

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

Open
GoogleCodeExporter opened this issue May 22, 2015 · 5 comments
Open

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 8 Jan 2013 at 6:06

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 26 Feb 2013 at 6:35

Attachments:

@GoogleCodeExporter
Copy link
Author

Awesome thanks!

Original comment by [email protected] on 26 Feb 2013 at 6:37

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 26 Feb 2013 at 6:44

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 28 Jul 2013 at 7:20

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

1 participant