Skip to content

mailto filter keeps the fragment, so #&attach= gets through #200

Closed

Description

@bketelsen

internal/desktop/system/open.go filters mailto links down to to, cc, bcc, subject and body, but it keeps the URL's fragment. So a link like

mailto:[email protected]?subject=x#&attach=/etc/passwd

passes through with #&attach=/etc/passwd intact. A mail client that doesn't split off the fragment before parsing the query reads that as an attach field, which is the attack the filter exists to stop.

Found while writing frostui's version of the same rule (frostyard/frostui#12), which drops the fragment.

To do:

  • Drop the fragment in the mailto filter, and add the case above to open_test.go.
  • Or, preferably, switch to frostui's SanitizeMailto once it is tagged, as plan 0009:535-537 intends, and delete the local copy.

Severity: security, medium. It depends on the mail client, but the filter's purpose is to make that irrelevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions