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

[WIP] Malicious website protection - Windows support #282

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mgurgel
Copy link
Collaborator

@mgurgel mgurgel commented Dec 23, 2024

Asana: https://app.asana.com/0/72649045549333/1208745889841028/f
Reviewer: @shakyShane

Note: Includes #252

Description:

Enables Malicious site protection warnings on Windows

Steps to test this PR:

  1. Visit preview
  2. Confirm that both phishing and malware states show on Windows

Copy link

netlify bot commented Dec 23, 2024

Deploy Preview for ddgdash ready!

Name Link
🔨 Latest commit e5f4573
🔍 Latest deploy log https://app.netlify.com/sites/ddgdash/deploys/67adf0473c2e1e00085c8a77
😎 Deploy Preview https://deploy-preview-282--ddgdash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Dec 23, 2024

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

NPM

npm i github:duckduckgo/privacy-dashboard#904d287af9af5e82ec9ac0006f33f78a36e62dfa

Git submodule:

git submodule update --remote --init submodules/privacy-dashboard
cd submodules/privacy-dashboard
git fetch origin
git checkout pr-releases/pr-227
git reset --hard origin/pr-releases/pr-227

Swift

.package(url: "https://github.com/duckduckgo/privacy-dashboard", revision: "904d287af9af5e82ec9ac0006f33f78a36e62dfa"),

@mgurgel mgurgel force-pushed the mgurgel/malware-support-windows branch 2 times, most recently from df7b189 to b2634d6 Compare January 20, 2025 15:24
@mgurgel mgurgel force-pushed the mgurgel/malware-support-windows branch 2 times, most recently from 065c777 to 38284fa Compare February 11, 2025 15:49
@@ -119,6 +124,7 @@ function handleViewModelUpdate(viewModel) {
certificateData = viewModel.certificates || [];
protections = viewModel.protections;
locale = viewModel.localeSettings?.locale;
maliciousSiteStatus = viewModel.maliciousSiteStatus;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be maliciousSiteStatus = viewModel.maliciousSiteStatus || { "kind": null }; to keep backwards compat with pre-Malicious-site Windows browser version (the Privacy Dashboard seems to crash if this isn't provided)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting that parameter to null would result in the same state as when the site is considered safe, meaning that in your version of the Windows app, the dashboard wouldn’t wait for the final state of maliciousSiteStatus before rendering, which would cause it to default to safe at first, and then switch to the unsafe state on malicious sites.

Seeing as how this change is only going out with the versions that support it, I think it’s safe to keep it that way. We’ve done the same on other platforms without issue.

If you’re still unsure about keeping it in though, we can discuss alternatives that don’t involve defaulting to null.

Copy link
Collaborator

@RendijsSmukulis RendijsSmukulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me - I made the exact same changes (except for the one commented line at shared/js/browser/windows-communication.js).

Probably still needs @shakyShane 's review, tho

@mgurgel mgurgel force-pushed the mgurgel/malware-support-windows branch from 22c03c1 to e5f4573 Compare February 13, 2025 13:14
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