Skip to content
This repository was archived by the owner on Jul 30, 2026. It is now read-only.
This repository was archived by the owner on Jul 30, 2026. It is now read-only.

Route unexpected taskpane errors through a generic user-facing message #129

Description

@dobby-coder

A draft security advisory has been filed for the taskpane's error-surfacing path. Details (impact, root cause, affected lines) are in the private advisory — not repeated here to avoid public disclosure:

https://github.com/encryption4all/postguard-outlook-addon/security/advisories/GHSA-hv6m-xwjr-m2f6

Scope of the work (see advisory for specifics):

  • Introduce an explicit "this message was written for the user" error marker in src/lib/, and use it for the validation failures that src/taskpane/compose-view.ts throws on purpose.
  • In the catch blocks of src/taskpane/compose-view.ts and src/taskpane/read-view.ts, show the marked message when present and a generic localized message (t("encryptionError") / t("decryptionError")) otherwise, with the raw value logged via console.error for DevTools only. This matches encryptionFailureMessage() in src/launchevent/launchevent.ts:95-105, which already does this on the send path.
  • Replace the ad-hoc /KEM/i message test in read-view.ts with a check that does not depend on matching SDK message text.
  • Add node:test coverage for the routing (marked error → own message; arbitrary error → generic message).

Repo maintainers/collaborators can view the advisory thread for full context. Same shape as #123.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions