zend-mail icon indicating copy to clipboard operation
zend-mail copied to clipboard

Properly encode content-disposition header

Open fredden opened this issue 5 years ago • 2 comments

Provide a narrative description of what you are trying to accomplish:

  • [x] Are you fixing a bug?
    • [x] Detail how the bug is invoked currently.
    • [x] Detail the original, incorrect behavior.
    • [x] Detail the new, expected behavior.
    • [x] Base your feature on the master branch, and submit against that branch.
    • [ ] Add a regression test that demonstrates the bug, and proves the fix.
    • [x] Add a CHANGELOG.md entry for the fix.

Always use ASCII for the content-disposition header. When using UTF-8 encoding, this results in a header being set as Content-Disposition: =?utf-8?Q?inline?= which is not interpreted properly by Thunderbird nor Microsoft Exchange / Outlook. This pull request forces encoding for this header to always be ASCII, so that the header reads Content-Disposition: inline and is correctly interpreted by email clients.

Fixes: https://github.com/magento/magento2/issues/25076

fredden avatar Dec 24 '19 12:12 fredden

This repository has been closed and moved to laminas/laminas-mail; a new issue has been opened at https://github.com/laminas/laminas-mail/issues/2.

weierophinney avatar Dec 31 '19 21:12 weierophinney

This repository has been moved to laminas/laminas-mail. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-mail to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-mail.
  • In your clone of laminas/laminas-mail, commit the files, push to your fork, and open the new PR. We will be providing tooling via laminas/laminas-migration soon to help automate the process.

weierophinney avatar Dec 31 '19 21:12 weierophinney