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

fix decrypt error rendering #1219

Merged
merged 13 commits into from
Dec 21, 2021
Merged

fix decrypt error rendering #1219

merged 13 commits into from
Dec 21, 2021

Conversation

ivan-ushakov
Copy link
Contributor

@ivan-ushakov ivan-ushakov commented Dec 13, 2021

close #1144
close #1143 // tom edit


Tests (delete all except exactly one):

  • Tests added or updated

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@ivan-ushakov ivan-ushakov changed the title Draft unit test for integrity check NO_MDC (not integrity protected) message produces empty screen Dec 13, 2021
Copy link
Collaborator

@tomholub tomholub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a note. I'm looking into it

Core/source/test/test-utils.ts Outdated Show resolved Hide resolved
@tomholub
Copy link
Collaborator

The Core is fine, and the longids are fine too, nothing to do with them.

The problem was that Swift could not parse the MsgBlock that was returned from TypeScript, and so it produced another block type blockParseErr which we were ignoring. Therefore empty message is rendered.

I've fixed the rendering of blockParseErr so now it shows as on screenshot below. Next step will be to also fix the reason why it was producing blockParseErr in the first place.

image

@tomholub
Copy link
Collaborator

The Core was returning back MsgBlock that could not be parsed (wrong types contained).

After fix:

image

@tomholub
Copy link
Collaborator

And here one more, tests will have to be updated.

image

@tomholub tomholub changed the title NO_MDC (not integrity protected) message produces empty screen fix decrypt error rendering Dec 17, 2021
@tomholub
Copy link
Collaborator

also mostly fixed #1143. The error was that while the text could be decrypted, the attachments were throwing decrypt errors. I've made it recognize decrypt errors and download the original file, but it needs another issue to actually render the decrypt error before downloading, make sure that's what the user wanted.

image

@tomholub
Copy link
Collaborator

tomholub commented Dec 17, 2021

This will need appium tests added and updated:

  • update test of subject "encrypted - MDC hash mismatch - modification detected - should fail" to check for the error message
  • update test of subject "not integrity protected - should show a warning and not decrypt automatically" to check for the error message
  • add another email to verify: "key mismatch unexpectedly produces a modal" where you should now be able to successfully view email body

@tomholub tomholub marked this pull request as ready for review December 17, 2021 20:51
@tomholub tomholub requested a review from sosnovsky as a code owner December 17, 2021 20:51
Copy link
Collaborator

@tomholub tomholub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sosnovsky this is ready for your review on Monday. Thanks!

FlowCrypt/Core/Core.swift Outdated Show resolved Hide resolved
FlowCrypt/Core/CoreTypes.swift Show resolved Hide resolved
@tomholub tomholub enabled auto-merge (squash) December 20, 2021 23:14
tomholub
tomholub previously approved these changes Dec 20, 2021
@tomholub tomholub merged commit 6a9a87e into master Dec 21, 2021
@tomholub tomholub deleted the feature/issue-1144 branch December 21, 2021 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants