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

Handle parsing of LF-only body with separate parts #1512

Open
wants to merge 1 commit into
base: 2-8-stable
Choose a base branch
from

Conversation

mikel
Copy link
Owner

@mikel mikel commented Dec 3, 2022

Forward port of #1319

Conversion of body to CRLF does not help here because body is not ascii_only so does not get converted. Instead to search for CR?LF (optional CR) in which case conversion to CRLF is unnecessary.

Conversion of body to CRLF does not help here because body is not ascii_only
so does not get converted. Instead to search for CR?LF (optional CR)
in which case conversion to CRLF is unnecessary.
@mikel mikel added Ready to Merge Ready to merge once specs are green More Work Needed and removed Ready to Merge Ready to merge once specs are green labels Dec 3, 2022
@mikel
Copy link
Owner Author

mikel commented Dec 3, 2022

As the 2.8 branch doesn't have all the specs running automatically, waiting for #1437 to be green before merging this.

@mikel
Copy link
Owner Author

mikel commented Dec 14, 2022

@sebbASF can you confirm there is nothing missing from #1511 ?

@sebbASF
Copy link
Collaborator

sebbASF commented Dec 14, 2022

Seems to be all OK

gbp added a commit to mysociety/alaveteli that referenced this pull request Aug 2, 2023
Always start with the unmasked attachment body when applying the masks
and censor rules. We're going to make changes which mean
`FoiAttachment#body` will return masked body, fetch this with
`default_body` could result in attachment with old or superseded censor
rules still applied.

Needed to force HTML attachment into CRLF line endings due to an issue
with the mail gem which results in a different hexdigest after
rebuilding the raw emails from a file on disk in the specs.

Once mikel/mail#1512 is merged we can revert the
FoiAttachment factory change.
gbp added a commit to mysociety/alaveteli that referenced this pull request Aug 3, 2023
Always start with the unmasked attachment body when applying the masks
and censor rules. We're going to make changes which mean
`FoiAttachment#body` will return masked body, fetch this with
`default_body` could result in attachment with old or superseded censor
rules still applied.

Needed to force HTML attachment into CRLF line endings due to an issue
with the mail gem which results in a different hexdigest after
rebuilding the raw emails from a file on disk in the specs.

Once mikel/mail#1512 is merged we can revert the
FoiAttachment factory change.
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

2 participants