Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Mailer] Ignore X-Transport while signing #15603

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

Closed
wants to merge 1 commit into from

Conversation

metaer
Copy link

@metaer metaer commented Aug 8, 2021

It is unclear that X-Transport must be ignored when signing email with using multiple transports in application:
symfony/symfony#39354 (comment)

@OskarStark
Copy link
Contributor

Are you sure, this does not need to be applied against 5.3

@carsonbot carsonbot changed the title Ignore X-Transport while signing [Mailer] Ignore X-Transport while signing Aug 9, 2021
@metaer
Copy link
Author

metaer commented Aug 9, 2021

Are you sure, this does not need to be applied against 5.3

It does.

@metaer metaer changed the base branch from 5.4 to 5.3 August 9, 2021 11:27
@metaer metaer requested a review from xabbuh as a code owner August 9, 2021 11:27
@fabpot
Copy link
Member

fabpot commented Aug 9, 2021

When I realized that the PR was not on 5.3, I cherry-picked the commit.

@metaer metaer changed the base branch from 5.3 to 5.4 August 9, 2021 11:30
@javiereguiluz
Copy link
Member

This is a bit confusing to me. We're adding this header to the list of ignored ones ... but we don't explain why.

Also ... in the related code comment we say: "if you don't ignore this header when using multiple transports, signature will fail" If that's true, shouldn't Symfony itself remove that header when signing the message?

@fabpot
Copy link
Member

fabpot commented Aug 9, 2021

Sorry, my comment does not make sense, I confuse 2 different PRs. Anyway, this should be fixed in the code, not in the docs.

@fabpot fabpot closed this Aug 9, 2021
@metaer metaer deleted the 5.4-ignore-x-transport branch August 20, 2021 10:40
fabpot added a commit to symfony/symfony that referenced this pull request Aug 20, 2021
…(metaer)

This PR was merged into the 5.3 branch.

Discussion
----------

Ignoring X-Transport header while signing email with DKIM

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Related PR       | symfony/symfony-docs#15603
| License       | MIT

Earlier `@fabpot` wrote in symfony/symfony-docs#15603 (comment):

> Anyway, this should be fixed in the code, not in the docs.

**Original problem**

If we have multiple transports and use one of them, signature will contain X-Transport header by default. But email will not:
https://github.com/symfony/symfony/blob/810599d2f0fd19558d140c19bc50eb4dc0021a2e/src/Symfony/Component/Mailer/Transport/Transports.php#L56

And signature will be invalid.

Commits
-------

b684d40 Ignoring X-Transport header while signing email with DKIM
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.

5 participants