Skip to content

feat(mail): show message trust banner - #688

Open
findleyl wants to merge 1 commit into
mainfrom
feat/message-trust-banner
Open

findleyl wants to merge 1 commit into
mainfrom
feat/message-trust-banner

Conversation

@findleyl

Copy link
Copy Markdown
Member

Summary

  • Parse the X-Aster-Trust header (verdict, score, reasons) and show a banner above the message for suspicious and phishing verdicts, with up to four known reasons.
  • For phishing, links in the message body stay inert until Turn on links is selected. The choice lasts for the session.
  • Report phishing appears only while the message is not already reported. It uses the existing report action (moves the message to Spam outside Spam) and sends a phishing verdict to POST /api/phishing/v1/report with SHA-256 hashes of the link hosts and the sender domain.
  • Not phishing dismisses the banner and sends a not_phishing verdict.
  • The older local phishing banner is hidden when the header banner is shown.
  • New strings in all 16 locales.

Testing

  • MessageTrustTest (7 tests) and MailViewModelTest (173 tests) pass locally with testFullDebugUnitTest.

Read the X-Aster-Trust header and show a banner with up to four
reasons. Phishing messages keep links off until Turn on links is
chosen for the session, and the banner offers Report phishing and
Not phishing, which send the verdict with hashed link domains.
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.

1 participant