Skip to content

Commit

Permalink
Merge branch 'main' into sam/update-wireguard-framework-to-1.1.3
Browse files Browse the repository at this point in the history
# By Juan Manuel Pereira (4) and others
# Via GitHub
* main:
  Improves VPN pixel info and adds tests (#2434)
  DBP: Implement event pixels (#2408)
  Bump BSK (#2435)
  Bump version to 1.80.0 (145)
  Fix syntax in Asana actions
  Bump version to 1.80.0 (144)
  Set marketing version to 1.80.0
  Update embedded files
  DBP: Debug scan model implementation (#2421)
  Roll back CPM post-rollout cleanup (#2430)
  Password Import: Ignore Excluded Sites When Importing from Chrome (#2404)
  Stub objects for Bookmarks DB (#2418)
  Properly handle edge cases (#2417)
  DBP: Treat 404 as failure instead of error (#2426)
  DBP: Use url instead of name to identify brokers on pixels (#2423)
  Fix determining if internal release should be automatically bumped

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
  • Loading branch information
samsymons committed Mar 18, 2024
2 parents d5541d8 + 67c9d66 commit 229e384
Show file tree
Hide file tree
Showing 68 changed files with 2,495 additions and 414 deletions.
2 changes: 1 addition & 1 deletion .github/actions/asana-create-action-item/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ runs:
task-url: ${{ inputs.release-task-url }}

- id: get-asana-user-id
if: github.event_name != "schedule"
if: github.event_name != 'schedule'
uses: duckduckgo/apple-infra/actions/asana-get-user-id-for-github-handle@main
with:
access-token: ${{ inputs.access-token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/asana-log-message/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
task-url: ${{ inputs.task-url }}

- id: get-asana-user-id
if: github.event_name != "schedule"
if: github.event_name != 'schedule'
uses: duckduckgo/apple-infra/actions/asana-get-user-id-for-github-handle@main
with:
access-token: ${{ inputs.access-token }}
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/bump_internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,21 @@ jobs:
echo "skip-release=false" >> $GITHUB_OUTPUT
else
latest_tag="$(git describe --tags --abbrev=0)"
changed_files="$(git diff --name-only "$latest_tag".."origin/${release_branch}")"
latest_tag_sha="$(git rev-parse "$latest_tag")"
release_branch_sha="$(git rev-parse "origin/${release_branch}")"
if grep -q -v -e '.github' -e 'scripts' <<< "$changed_files"; then
echo "skip-release=false" >> $GITHUB_OUTPUT
else
echo "::warning::No changes to the release branch (or only changes to scripts and workflows). Skipping automatic release."
if [[ "${latest_tag_sha}" == "${release_branch_sha}" ]]; then
echo "::warning::Release branch's HEAD is already tagged. Skipping automatic release."
echo "skip-release=true" >> $GITHUB_OUTPUT
else
changed_files="$(git diff --name-only "$latest_tag".."origin/${release_branch}")"
if grep -q -v -e '.github' -e 'scripts' <<< "$changed_files"; then
echo "::warning::New code changes found in the release branch since the last release. Will bump internal release now."
echo "skip-release=false" >> $GITHUB_OUTPUT
else
echo "::warning::No changes to the release branch (or only changes to scripts and workflows). Skipping automatic release."
echo "skip-release=true" >> $GITHUB_OUTPUT
fi
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 143
CURRENT_PROJECT_VERSION = 145
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 1.79.0
MARKETING_VERSION = 1.80.0
6 changes: 6 additions & 0 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2171,6 +2171,8 @@
7B00997F2B6508C200FE7C31 /* NetworkProtectionProxy in Frameworks */ = {isa = PBXBuildFile; productRef = 7B00997E2B6508C200FE7C31 /* NetworkProtectionProxy */; };
7B0099822B65C6B300FE7C31 /* MacTransparentProxyProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B0099802B65C6B300FE7C31 /* MacTransparentProxyProvider.swift */; };
7B0694982B6E980F00FA4DBA /* VPNProxyLauncher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B0694972B6E980F00FA4DBA /* VPNProxyLauncher.swift */; };
7B09CBA92BA4BE8100CF245B /* NetworkProtectionPixelEventTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B09CBA72BA4BE7000CF245B /* NetworkProtectionPixelEventTests.swift */; };
7B09CBAA2BA4BE8200CF245B /* NetworkProtectionPixelEventTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B09CBA72BA4BE7000CF245B /* NetworkProtectionPixelEventTests.swift */; };
7B1459542B7D437200047F2C /* BrowserWindowManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B0099782B65013800FE7C31 /* BrowserWindowManager.swift */; };
7B1459552B7D438F00047F2C /* VPNProxyLauncher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B0694972B6E980F00FA4DBA /* VPNProxyLauncher.swift */; };
7B1459572B7D43E500047F2C /* NetworkProtectionProxy in Frameworks */ = {isa = PBXBuildFile; productRef = 7B1459562B7D43E500047F2C /* NetworkProtectionProxy */; };
Expand Down Expand Up @@ -3833,6 +3835,7 @@
7B0099802B65C6B300FE7C31 /* MacTransparentProxyProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacTransparentProxyProvider.swift; sourceTree = "<group>"; };
7B05829D2A812AC000AC3F7C /* NetworkProtectionOnboardingMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkProtectionOnboardingMenu.swift; sourceTree = "<group>"; };
7B0694972B6E980F00FA4DBA /* VPNProxyLauncher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNProxyLauncher.swift; sourceTree = "<group>"; };
7B09CBA72BA4BE7000CF245B /* NetworkProtectionPixelEventTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionPixelEventTests.swift; sourceTree = "<group>"; };
7B1E819B27C8874900FF0E60 /* ContentOverlayPopover.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentOverlayPopover.swift; sourceTree = "<group>"; };
7B1E819C27C8874900FF0E60 /* ContentOverlay.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ContentOverlay.storyboard; sourceTree = "<group>"; };
7B1E819D27C8874900FF0E60 /* ContentOverlayViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentOverlayViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6095,6 +6098,7 @@
4BCF15E62ABB98A20083F6DF /* Resources */,
4BCF15E42ABB98990083F6DF /* NetworkProtectionRemoteMessageTests.swift */,
4BD57C032AC112DF00B580EE /* NetworkProtectionRemoteMessagingTests.swift */,
7B09CBA72BA4BE7000CF245B /* NetworkProtectionPixelEventTests.swift */,
);
path = NetworkProtection;
sourceTree = "<group>";
Expand Down Expand Up @@ -10702,6 +10706,7 @@
3706FE78293F661700E42796 /* HistoryCoordinatingMock.swift in Sources */,
3706FE79293F661700E42796 /* AppearancePreferencesTests.swift in Sources */,
3706FE7A293F661700E42796 /* FirePopoverViewModelTests.swift in Sources */,
7B09CBAA2BA4BE8200CF245B /* NetworkProtectionPixelEventTests.swift in Sources */,
3706FE7B293F661700E42796 /* HistoryStoringMock.swift in Sources */,
562984702AC4610100AC20EB /* SyncPreferencesTests.swift in Sources */,
3706FE7C293F661700E42796 /* LocalBookmarkStoreTests.swift in Sources */,
Expand Down Expand Up @@ -12509,6 +12514,7 @@
FD23FD2B28816606007F6985 /* AutoconsentMessageProtocolTests.swift in Sources */,
1D77921A28FDC79800BE0210 /* FaviconStoringMock.swift in Sources */,
1D1C36E629FB019C001FA40C /* HistoryTabExtensionTests.swift in Sources */,
7B09CBA92BA4BE8100CF245B /* NetworkProtectionPixelEventTests.swift in Sources */,
B6DA441E2616C84600DD1EC2 /* PixelStoreMock.swift in Sources */,
4B434690285ED7A100177407 /* BookmarksBarViewModelTests.swift in Sources */,
B6BBF1702744CDE1004F850E /* CoreDataStoreTests.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "c8ed701b513cf5177118a175d85fbbbcd707ab41",
"version" : "1.3.0"
"revision" : "46989693916f56d1186bd59ac15124caef896560",
"version" : "1.3.1"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
<Test
Identifier = "PixelStoreTests/testWhenValuesAreRemovedThenTheyAreNotInCache()">
</Test>
<Test
Identifier = "PreferencesSidebarModelTests/testWhenResetTabSelectionIfNeededCalledThenPreferencesTabIsSelected()">
</Test>
<Test
Identifier = "StatisticsLoaderTests/testWhenRefreshRetentionAtbIsPerformedForNavigationThenAppRetentionAtbRequested()">
</Test>
Expand Down
Binary file modified DuckDuckGo/Assets.xcassets/Images/ITR-Icon.imageset/ITR-Icon.pdf
Binary file not shown.
Binary file not shown.
25 changes: 19 additions & 6 deletions DuckDuckGo/Bookmarks/Model/Bookmark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,32 @@ internal class BaseBookmarkEntity: Identifiable {

static func singleEntity(with uuid: String) -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K == %@ AND %K == NO", #keyPath(BookmarkEntity.uuid), uuid, #keyPath(BookmarkEntity.isPendingDeletion))
request.predicate = NSPredicate(format: "%K == %@ AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.uuid), uuid,
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

static func favorite(with uuid: String, favoritesFolder: BookmarkEntity) -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K == %@ AND %K CONTAINS %@ AND %K == NO AND %K == NO",
request.predicate = NSPredicate(format: "%K == %@ AND %K CONTAINS %@ AND %K == NO AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.uuid),
uuid as CVarArg,
#keyPath(BookmarkEntity.favoriteFolders),
favoritesFolder,
#keyPath(BookmarkEntity.isFolder),
#keyPath(BookmarkEntity.isPendingDeletion))
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

static func entities(with identifiers: [String]) -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K IN %@ AND %K == NO", #keyPath(BookmarkEntity.uuid), identifiers, #keyPath(BookmarkEntity.isPendingDeletion))
request.predicate = NSPredicate(format: "%K IN %@ AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.uuid), identifiers,
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

Expand Down Expand Up @@ -98,7 +105,10 @@ final class BookmarkFolder: BaseBookmarkEntity {

static func bookmarkFoldersFetchRequest() -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K == YES AND %K == NO", #keyPath(BookmarkEntity.isFolder), #keyPath(BookmarkEntity.isPendingDeletion))
request.predicate = NSPredicate(format: "%K == YES AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.isFolder),
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

Expand Down Expand Up @@ -135,7 +145,10 @@ final class Bookmark: BaseBookmarkEntity {

static func bookmarksFetchRequest() -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K == NO AND %K == NO", #keyPath(BookmarkEntity.isFolder), #keyPath(BookmarkEntity.isPendingDeletion))
request.predicate = NSPredicate(format: "%K == NO AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.isFolder),
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

Expand Down
1 change: 0 additions & 1 deletion DuckDuckGo/Common/Localizables/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,6 @@ struct UserText {

// "data-broker-protection.optionsMenu" - Menu item data broker protection feature
static let dataBrokerProtectionOptionsMenuItem = "Personal Information Removal"
static let dataBrokerProtectionScanOptionsMenuItem = "Personal Information Removal Scan"
// "tab.dbp.title" - Tab data broker protection title
static let tabDataBrokerProtectionTitle = "Personal Information Removal"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import BrowserServicesKit
final class AppPrivacyConfigurationDataProvider: EmbeddedDataProvider {

public struct Constants {
public static let embeddedDataETag = "\"b9487380b1490e67513c650e9497a28c\""
public static let embeddedDataSHA = "79590d4f2a9713b20eb127a29f862130fdc964145917004031022beaecf80fd0"
public static let embeddedDataETag = "\"11616ebbea5b6d7731bf08d224c6b1a7\""
public static let embeddedDataSHA = "980b19df068a45b754ed6865295960a914c3d2c3bcc2f20b9d1f8a5f2c1d68c3"
}

var embeddedDataEtag: String {
Expand Down
68 changes: 50 additions & 18 deletions DuckDuckGo/ContentBlocker/macos-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"readme": "https://github.com/duckduckgo/privacy-configuration",
"version": 1710170291349,
"version": 1710501855617,
"features": {
"adClickAttribution": {
"readme": "https://help.duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/#3rd-party-tracker-loading-protection",
Expand Down Expand Up @@ -264,6 +264,18 @@
{
"domain": "meneame.net"
},
{
"domain": "espn.com"
},
{
"domain": "usaa.com"
},
{
"domain": "publico.es"
},
{
"domain": "cnbc.com"
},
{
"domain": "earth.google.com"
},
Expand All @@ -287,7 +299,7 @@
]
},
"state": "enabled",
"hash": "8458a9cc012a9613e1497204003be946"
"hash": "ec25d3a0b633fbc4f208f35999f4ab0e"
},
"autofill": {
"exceptions": [
Expand Down Expand Up @@ -968,8 +980,11 @@
},
"clientBrandHint": {
"exceptions": [],
"settings": {
"domains": []
},
"state": "disabled",
"hash": "728493ef7a1488e4781656d3f9db84aa"
"hash": "d35dd75140cdfe166762013e59eb076d"
},
"contentBlocking": {
"state": "enabled",
Expand Down Expand Up @@ -3904,6 +3919,23 @@
}
]
},
{
"domain": "uzone.id",
"rules": [
{
"selector": "[class^='box-ads']",
"type": "hide-empty"
},
{
"selector": "[class^='section-ads']",
"type": "hide-empty"
},
{
"selector": ".parallax-container",
"type": "hide-empty"
}
]
},
{
"domain": "washingtontimes.com",
"rules": [
Expand Down Expand Up @@ -3984,7 +4016,7 @@
]
},
"state": "enabled",
"hash": "3dc2d5b9a38827f46503a3b5882c7e33"
"hash": "3098b766cd343378237605f207f4fd17"
},
"exceptionHandler": {
"exceptions": [
Expand Down Expand Up @@ -4878,6 +4910,16 @@
"state": "enabled",
"settings": {
"allowlistedTrackers": {
"2mdn.net": {
"rules": [
{
"rule": "2mdn.net",
"domains": [
"crunchyroll.com"
]
}
]
},
"3lift.com": {
"rules": [
{
Expand Down Expand Up @@ -6013,22 +6055,11 @@
"fwmrm.net": {
"rules": [
{
"rule": "2a7e9.v.fwmrm.net/ad/g/1",
"rule": "v.fwmrm.net/ad",
"domains": [
"6play.fr",
"channel4.com"
]
},
{
"rule": "2a7e9.v.fwmrm.net/ad/l/1",
"domains": [
"channel4.com"
]
},
{
"rule": "7cbf2.v.fwmrm.net/ad/g/1",
"domains": [
"6play.fr"
]
}
]
},
Expand Down Expand Up @@ -6197,6 +6228,7 @@
"domains": [
"arkadium.com",
"bloomberg.com",
"crunchyroll.com",
"gamak.tv",
"games.washingtonpost.com",
"metro.co.uk",
Expand Down Expand Up @@ -7946,7 +7978,7 @@
"domain": "sundancecatalog.com"
}
],
"hash": "4325ed151d126936fbeb9a608d77da86"
"hash": "1bbefc586e08d2c42b5db17ed95cc8e5"
},
"trackingCookies1p": {
"settings": {
Expand Down
6 changes: 5 additions & 1 deletion DuckDuckGo/DBP/DBPHomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ public class DataBrokerProtectionPixelsHandler: EventMapping<DataBrokerProtectio
.dataBrokerProtectionNotificationOpenedAllRecordsRemoved,
.dailyActiveUser,
.weeklyActiveUser,
.monthlyActiveUser:
.monthlyActiveUser,
.weeklyReportScanning,
.weeklyReportRemovals,
.scanningEventNewMatch,
.scanningEventReAppearance:
Pixel.fire(.pixelKitEvent(event))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ final class ChromiumLoginReader {
private let decryptionKey: String?
private let decryptionKeyPrompt: ChromiumKeychainPrompting

private static let sqlSelectWithPasswordTimestamp = "SELECT signon_realm, username_value, password_value, date_password_modified FROM logins;"
private static let sqlSelectWithCreatedTimestamp = "SELECT signon_realm, username_value, password_value, date_created FROM logins;"
private static let sqlSelectWithoutTimestamp = "SELECT signon_realm, username_value, password_value FROM logins;"
private static let sqlSelectWithPasswordTimestamp = "SELECT signon_realm, username_value, password_value, date_password_modified, blacklisted_by_user FROM logins WHERE blacklisted_by_user != 1;"
private static let sqlSelectWithCreatedTimestamp = "SELECT signon_realm, username_value, password_value, date_created, blacklisted_by_user FROM logins WHERE blacklisted_by_user != 1;"
private static let sqlSelectWithoutTimestamp = "SELECT signon_realm, username_value, password_value, blacklisted_by_user FROM logins WHERE blacklisted_by_user != 1;"

private let source: DataImport.Source

Expand Down
Loading

0 comments on commit 229e384

Please sign in to comment.