Skip to content

Before opening a link, display a popup with the actual address of the link #1938

@nilsreichardt

Description

@nilsreichardt

Problem

Using the Markdown linking feature, it's to perform phishing attacks, like:

https://google.com

The user thinks they will open google.com.

Solution

Similar to Discord when you write the following message:

[https:/google.com](https://test.com)

Discord will show a dialog:

Image

This dialog display the actual URL of the link. We should show this if the text != href. Also a checkbox to trust the domain from on.

The MarkdownBody widget can be used as:

MarkdownBody(
  data: description!,
  onTapLink: (text, href, title) => launchURL(url, context: context),
),

We need a method openSafeMarkdownURL({required String text, required String href, required BuildContext, required KeyValueStore keyValueStore}) in our sharezone_widgets package that handles this ticket.

Also add tests (golden tests & unit tests).

All relevant files for that tickets:

  • app/lib/util/cache/key_value_store.dart
  • lib/sharezone_widgets (sharezone_widgets package)

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