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

Ascii encoding #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Ascii encoding #3

wants to merge 4 commits into from

Conversation

crowbot
Copy link
Member

@crowbot crowbot commented Oct 23, 2015

  • Need tests to demonstrate the new error

Rake was failing because PKG_NAME was not defined.
Rescue from Encoding::CompatibilityError when converting Mapi::Mime to a String.

In some situations the parts can legitimately be different encodings,
but cannot be concatenated given the encoding differences.

In this situation, force the encoding to ASCII-8BIT rather than
erroring.
mysociety-pusher pushed a commit to mysociety/alaveteli that referenced this pull request Oct 13, 2020
Sometimes we receive messages with outlook attachments that can't be
parsed due to an issue in mapi [1].

There's a potential fix [2] but it conflicts [3] with an existing patch
we apply [4].

This at least allows users to download the raw attachment, rather than
us preventing the entire request from loading because we raise an
exception.

Part of #5783.

[1] aquasync/ruby-msg#15
[2] aquasync/ruby-msg#16
[3] #5783 (comment)
[4] mysociety/ruby-msg#3
mysociety-pusher pushed a commit to mysociety/alaveteli that referenced this pull request Oct 14, 2020
Sometimes we receive messages with outlook attachments that can't be
parsed due to an issue in mapi [1].

There's a potential fix [2] but it conflicts [3] with an existing patch
we apply [4].

This at least allows users to download the raw attachment, rather than
us preventing the entire request from loading because we raise an
exception.

It's not easy to include an attachment in the specs to replicate a real
error case due to the complexity of removing PII, so I've just stubbed
the call to `.open` as we don't care about the specifics in this spec.

`script/handle-mail-replies` needs an explicit require as we minimise
the load path for that script.

Part of #5783.

[1] aquasync/ruby-msg#15
[2] aquasync/ruby-msg#16
[3] #5783 (comment)
[4] mysociety/ruby-msg#3
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