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

Fix crash when semicolon present in attachment name #219

Merged
merged 1 commit into from
Apr 22, 2022

Conversation

nicknytko
Copy link
Contributor

@nicknytko nicknytko commented Apr 4, 2022

Fixes crash when ; present in attachment name.

Example content disposition, slightly edited for privacy:

attachment; filename="abcd;efgh;b.jpg";
	size=54924; creation-date="Thu, 10 Mar 2022 20:38:32 GMT";
	modification-date="Thu, 10 Mar 2022 20:38:28 GMT"

This patch splits the content disposition on semicolons, ignoring when it is present inside of a "-delimited string. Should resolve #220

@sebix
Copy link

sebix commented Apr 5, 2022

Reminds me of c-like for-loop coding. When it works, it's still better than a bug :)

What would be cool are test cases, so that future changes or re-factoring don't break the compatibility again.

@martinrusev martinrusev merged commit 73ef226 into martinrusev:master Apr 22, 2022
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.

Loading inbox crashes when attachment contains ; in name
3 participants