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

Validate list of emails in validateLink function #2750

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Sep 20, 2024

This improves the hostname validation when using a list of emails rather than a single email.

@Mrtenz Mrtenz requested a review from a team as a code owner September 20, 2024 13:59
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.36%. Comparing base (490e547) to head (7f2ab2c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2750   +/-   ##
=======================================
  Coverage   94.35%   94.36%           
=======================================
  Files         476      476           
  Lines       10138    10143    +5     
  Branches     1542     1542           
=======================================
+ Hits         9566     9571    +5     
  Misses        572      572           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mrtenz Mrtenz merged commit 178fc21 into main Sep 23, 2024
165 checks passed
@Mrtenz Mrtenz deleted the mrtenz/validate-list-of-emails branch September 23, 2024 10:11
github-merge-queue bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Oct 14, 2024
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Fixes two problems with Snaps usage of `PhishingController`. Following
#25839 the
PhishingController expects full URLs instead of hostnames as the input
to `testOrigin`. In that PR, the argument of `isOnPhishingList` was
incorrectly changed. This PR also patches in some changes from the
`snaps` repo that are currently blocked by a release:
MetaMask/snaps#2835,
MetaMask/snaps#2750

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27817?quickstart=1)

## **Manual testing steps**

1. Create a Snap that links to an URL blocked with `eth-phishing-detect`
2. See that triggering the Snap is disallowed if the user has phishing
detection enabled
github-merge-queue bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Oct 14, 2024
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Fixes two problems with Snaps usage of `PhishingController`. Following
#25839 the
PhishingController expects full URLs instead of hostnames as the input
to `testOrigin`. In that PR, the argument of `isOnPhishingList` was
incorrectly changed. This PR also patches in some changes from the
`snaps` repo that are currently blocked by a release:
MetaMask/snaps#2835,
MetaMask/snaps#2750

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27817?quickstart=1)

## **Manual testing steps**

1. Create a Snap that links to an URL blocked with `eth-phishing-detect`
2. See that triggering the Snap is disallowed if the user has phishing
detection enabled
FrederikBolding added a commit to MetaMask/metamask-extension that referenced this pull request Oct 14, 2024
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

Fixes two problems with Snaps usage of `PhishingController`. Following
#25839 the
PhishingController expects full URLs instead of hostnames as the input
to `testOrigin`. In that PR, the argument of `isOnPhishingList` was
incorrectly changed. This PR also patches in some changes from the
`snaps` repo that are currently blocked by a release:
MetaMask/snaps#2835,
MetaMask/snaps#2750

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27817?quickstart=1)

1. Create a Snap that links to an URL blocked with `eth-phishing-detect`
2. See that triggering the Snap is disallowed if the user has phishing
detection enabled
danjm pushed a commit to MetaMask/metamask-extension that referenced this pull request Oct 15, 2024
## **Description**

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

Fixes two problems with Snaps usage of `PhishingController`. Following
#25839 the
PhishingController expects full URLs instead of hostnames as the input
to `testOrigin`. In that PR, the argument of `isOnPhishingList` was
incorrectly changed. This PR also patches in some changes from the
`snaps` repo that are currently blocked by a release:
MetaMask/snaps#2835,
MetaMask/snaps#2750

This PR cherry-picks a commit from `develop` that fixes this:
1f1e142

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27833?quickstart=1)

## **Manual testing steps**

1. Create a Snap that links to an URL blocked with `eth-phishing-detect`
2. See that triggering the Snap is disallowed if the user has phishing
detection enabled
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.

2 participants