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

[Mime] Fix boundary header #36026

Merged
merged 1 commit into from Mar 14, 2020
Merged

[Mime] Fix boundary header #36026

merged 1 commit into from Mar 14, 2020

Conversation

guillbdx
Copy link

@guillbdx guillbdx commented Mar 11, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #35443 (fixes the second problem described in this ticket)
License MIT

The boundary value of Content-Type header was enclosed in quotes, cause of the "=" symbol.

@guillbdx guillbdx changed the title [Mime] Fix header boundary [Mime] Fix boundary header Mar 11, 2020
@guillbdx guillbdx closed this Mar 11, 2020
@guillbdx guillbdx reopened this Mar 11, 2020
@fabpot
Copy link
Member

fabpot commented Mar 11, 2020

What does it fix?

@guillbdx
Copy link
Author

guillbdx commented Mar 11, 2020

Description updated.

@fabpot
Copy link
Member

fabpot commented Mar 11, 2020

As far as I know, the current chars used in the boundary are correct, so I would prefer that we fix the root cause instead.

@guillbdx
Copy link
Author

Yes, after checking, the chars are correct, and the quotes should not cause any problem at all, that's even a recommandation:

The grammar for parameters on the Content-type field is such that it is often necessary to enclose the boundary parameter values in quotes on the Content-type line. This is not always necessary, but never hurts.
https://tools.ietf.org/html/rfc2046#section-5.1.1

So I assume the root cause is API side in the ticket #35443 and there's not much we can do.

@n3o77
Copy link
Contributor

n3o77 commented Mar 12, 2020

I think the actual problem here is that the boundary is only put in quotes in the header but not the parts in the message (as described here: #35443 (comment) )

@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Mar 12, 2020
@guillbdx
Copy link
Author

guillbdx commented Mar 12, 2020

@n3o77 It's normal, quotes are only for the parameter value in the header: https://tools.ietf.org/html/rfc2046#section-5.1.1

Anyway, this PR should fix this interoperability issue.

@fabpot
Copy link
Member

fabpot commented Mar 14, 2020

Thank you @guillbdx.

@fabpot fabpot merged commit f166fe5 into symfony:4.4 Mar 14, 2020
This was referenced Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants