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

#4342 re-fetch cleartext signed message when HTML version is corrupted #4961

Merged
merged 10 commits into from
Feb 24, 2023

Conversation

rrrooommmaaa
Copy link
Contributor

@rrrooommmaaa rrrooommmaaa commented Feb 19, 2023

This PR re-fetches cleartext signed message from text/plain alternative part if signature verification fails

close #4342

issue #4810 (sets an example of how to test GmailElementReplacer)

issue #4929 (added a test helper method pgpBlockCheck for checking data in an existing pgp block)


Tests (delete all except exactly one):

  • Tests added

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

@rrrooommmaaa rrrooommmaaa marked this pull request as ready for review February 23, 2023 10:37
testWithBrowser('ci.tests.gmail', async (t, browser) => {
const acctEmail = 'ci.tests.gmail@flowcrypt.test';
const settingsPage = await browser.newExtensionSettingsPage(t, acctEmail);
const accessToken = await BrowserRecipe.getGoogleAccessToken(settingsPage, acctEmail); // todo: include in t?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can simplify some tests if we can extract google access token from t -- we can put it there in a helper method like setUpCommonAcct, so we don't have to open a dummy page just to retrieve the access token.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, it'll be nice to have access token available through t. Probably we can include such improvement when working on part 2 of #4494, there we can fetch access token when configuring test account.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@rrrooommmaaa rrrooommmaaa changed the title #4342 re-fetch cleartext signed message when HTML version is corrupted (WIP) #4342 re-fetch cleartext signed message when HTML version is corrupted Feb 23, 2023
Copy link
Collaborator

@sosnovsky sosnovsky left a comment

Choose a reason for hiding this comment

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

Well done 👍 Just a small improvement for eslint-disable

test/source/mock/google/google-data.ts Show resolved Hide resolved
testWithBrowser('ci.tests.gmail', async (t, browser) => {
const acctEmail = 'ci.tests.gmail@flowcrypt.test';
const settingsPage = await browser.newExtensionSettingsPage(t, acctEmail);
const accessToken = await BrowserRecipe.getGoogleAccessToken(settingsPage, acctEmail); // todo: include in t?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, it'll be nice to have access token available through t. Probably we can include such improvement when working on part 2 of #4494, there we can fetch access token when configuring test account.

Copy link
Collaborator

@sosnovsky sosnovsky left a comment

Choose a reason for hiding this comment

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

👍

testWithBrowser('ci.tests.gmail', async (t, browser) => {
const acctEmail = 'ci.tests.gmail@flowcrypt.test';
const settingsPage = await browser.newExtensionSettingsPage(t, acctEmail);
const accessToken = await BrowserRecipe.getGoogleAccessToken(settingsPage, acctEmail); // todo: include in t?
Copy link
Collaborator

Choose a reason for hiding this comment

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

@sosnovsky sosnovsky merged commit 90825f5 into master Feb 24, 2023
@sosnovsky sosnovsky deleted the issue-4342-refetch-cleartext-signed-messages branch February 24, 2023 10:55
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.

signed message occasionally throws an error 'Message digest did not match'
2 participants