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

[#7855] Attachment masking fixes #7856

Merged
merged 4 commits into from
Aug 11, 2023
Merged

[#7855] Attachment masking fixes #7856

merged 4 commits into from
Aug 11, 2023

Commits on Aug 11, 2023

  1. Refactor specs

    We're going to add additional contexts so refactor some specs tto add an
    initial context.
    gbp committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    9f99516 View commit details
    Browse the repository at this point in the history
  2. Add method to attempt to find original attachment

    We might have attachments in the database with the incorrect hexdigest.
    If so we won't be able to find the original attachment body. This commit
    adds a method which accounts for 2 scenarios which might cause the
    hexdigest to change. 1. different line endings, 2 leading zeros on dates
    
    Both of these changes have been caused by upstream changes to the mail
    gem we use to parse the emails but this hasn't been apparent until
    recently.
    gbp committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    6d20761 View commit details
    Browse the repository at this point in the history
  3. Rescue mismatched attachment hexdigest errors

    Now attempt to find the attachment by calculating the hexdigest based on
    a number of possible difference that have been observed. See previous
    commit.
    
    Fixes #7855
    gbp committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    01788fe View commit details
    Browse the repository at this point in the history
  4. Update FoiAttachment#body

    Ensure we don't get stuck in the loop when masking jobs are already
    queued.
    gbp committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    2f98092 View commit details
    Browse the repository at this point in the history