Skip to content

Conversation

@sergeypayu
Copy link

A better boundary detection that won't fail on such example:
Content-Type: multipart/report;
boundary="----=_Part_2509169_1730566862.1445846478023";
report-type=delivery-status

A better boundary detection that won't fail on such example:
Content-Type: multipart/report; 
	boundary="----=_Part_2509169_1730566862.1445846478023"; 
	report-type=delivery-status
@djmattyg007
Copy link

Hi there. I'm interested in including this change in my fork of this library: https://github.com/djmattyg007/official-library-php-email-parser

Would you be able to explain in a bit more detail what the change is and why it wouldn't work properly in the past? Also, would you be able to add a test email in the tests directory that will only pass with this change?

@sergeypayu
Copy link
Author

The change I made addresses the issue with parsing boundary string if there is more data on the line. Like in provided example boundary="----=_Part_2509169_1730566862.1445846478023"; report-type=delivery-status
Before my fix it would have taken the whole string till the end as boundary, while we need only the part between "=" and ";".

@djmattyg007
Copy link

I've just pushed a new version of my library that includes this fix. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants