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

Fix Gatekeeper dialog for binaries downloaded by the browser #2068

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

ayoy
Copy link
Collaborator

@ayoy ayoy commented Jan 16, 2024

Task/Issue URL: https://app.asana.com/0/1177771139624306/1203568220589424/f

Description:
Always overwrite quarantine type to web download or other download to show "DuckDuckGo downloaded this file"
instead of "DuckDuckGo created this file" Gatekeeper dialogs for downloaded binaries.

Steps to test this PR:

  1. Go to https://duckduckgo.com/mac and download the browser DMG file.
  2. Open DMG and move the app to Desktop.
  3. Open the app
  4. Verify that you see a Gatekeeper dialog warning before opening the app, explaining that DuckDuckGo downloaded (and not created) this app.

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@ayoy ayoy requested a review from mallexxx January 16, 2024 12:59
@ayoy ayoy marked this pull request as draft January 16, 2024 13:00
@ayoy ayoy marked this pull request as ready for review January 16, 2024 13:06
@@ -423,11 +423,9 @@ extension URL {
quarantineProperties[kLSQuarantineDataURLKey as String] = sourceURL
quarantineProperties[kLSQuarantineOriginURLKey as String] = referrerURL

if quarantineProperties[kLSQuarantineTypeKey as String] == nil {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mallexxx any idea why we're checking for nil here? I'm testing various download types (on a release build vs this branch), such as ICS calendar invitations and they're all unaffected by this change. I suppose we're fine with removing this if statement but let me know if we're not. Thanks!

Copy link
Collaborator

@mallexxx mallexxx Jan 17, 2024

Choose a reason for hiding this comment

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

I don‘t remember exactly why the check was there probably it‘s just a precaution not to overwrite a default value

Copy link
Collaborator

@mallexxx mallexxx left a comment

Choose a reason for hiding this comment

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

LGTM, works great!

@ayoy ayoy assigned ayoy and unassigned mallexxx Jan 17, 2024
@ayoy ayoy merged commit 5352e94 into main Jan 18, 2024
15 checks passed
@ayoy ayoy deleted the dominik/fix-gatekeeper-dialog branch January 18, 2024 19:19
samsymons added a commit that referenced this pull request Jan 19, 2024
* main:
  Fix Gatekeeper dialog for binaries downloaded by the browser (#2068)
  Display "Copy Email Address" context menu action for email links (#2076)
  add pixels for sync flows (#2056)
  Sign up with Apple bug fix (#2083)
  Improve DBP onboarding experience for FE devs (#2082)
  Prompt for Primary Password for FF Key3.db logins (#2066)
  Throw error on import database mapping error (#2065)
  Bump BrowserServicesKit Version (#2063)
  Bump autoconsent to 9.1.0 (#2067)
  Fix casing in some copy items in Preferences and Main Menu (#2070)
  Fix vertical alignment of privacy feed shield icon (#2069)
  Fix giving focus to webView when it's loaded in BrowserTabViewController (#2073)
samsymons added a commit that referenced this pull request Jan 21, 2024
* main: (37 commits)
  Fix IPC memory leak (DBP support) (#2092)
  fix DBP UI at duck://dbp url (#2094)
  Avoid unnecessary work during bulk drag and drop bookmarks bar operations (#2088)
  Update URL.isDuckPlayer to return true also for duck scheme URLs (#2093)
  Add dataBroker name to DBP email generation  (#2072)
  Show/dismiss Privacy Dashboard on mouse-down (#2064)
  Allow arbitrary content loading for DBP (#2084)
  The appcast reference fix for version 0.31.7 (#2075)
  replace app-bound about: urls with duck:// urls (#2061)
  fix non-Safari DDG iOS bookmarks HTML import (#2039)
  Import "synced" bookmarks from Chrome&Firefox; Keep original root folders (#2049)
  Remove alphabetic sorting in Bookmarks Sidebar (#2048)
  Drop BookmarkTableCellView.xib (#2079)
  Fix Gatekeeper dialog for binaries downloaded by the browser (#2068)
  Display "Copy Email Address" context menu action for email links (#2076)
  add pixels for sync flows (#2056)
  Sign up with Apple bug fix (#2083)
  Improve DBP onboarding experience for FE devs (#2082)
  Prompt for Primary Password for FF Key3.db logins (#2066)
  Throw error on import database mapping error (#2065)
  ...
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