From 7a14a58eb0dd6d800a6b5afa84b488ec2d33f385 Mon Sep 17 00:00:00 2001 From: Shane Osbourne Date: Mon, 18 Nov 2024 13:34:26 +0000 Subject: [PATCH 1/4] bump css + bsk --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 10 +++++----- DuckDuckGo/EmailSignupViewController.swift | 1 + DuckDuckGo/ScriptSourceProviding.swift | 3 +++ DuckDuckGo/TabViewController.swift | 1 + 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 3506b3cf5f..208120b3ca 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11035,8 +11035,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { - kind = exactVersion; - version = 210.0.3; + branch = "11-14-css_adding_a_new_messagesecret_properties_for_injected_scripts"; + kind = branch; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ce3cd40e6c..00552f87c2 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "a296f015a572fdfe53a81de653efb9a6d7fc3eba", - "version" : "210.0.3" + "branch" : "11-14-css_adding_a_new_messagesecret_properties_for_injected_scripts", + "revision" : "e52b8c7c20e2f4c16781f694a3d596dc8df4d201" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/content-scope-scripts", "state" : { - "revision" : "adca39c379b1a124f9990e9d0308c374f32f5018", - "version" : "6.32.0" + "revision" : "f2caf4ff814f4714d07d6fc2cf02498cb54a1389", + "version" : "6.36.0" } }, { @@ -138,7 +138,7 @@ { "identity" : "swift-argument-parser", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-argument-parser.git", + "location" : "https://github.com/apple/swift-argument-parser", "state" : { "revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b", "version" : "1.4.0" diff --git a/DuckDuckGo/EmailSignupViewController.swift b/DuckDuckGo/EmailSignupViewController.swift index e0c405ec61..056f861310 100644 --- a/DuckDuckGo/EmailSignupViewController.swift +++ b/DuckDuckGo/EmailSignupViewController.swift @@ -425,6 +425,7 @@ extension EmailSignupViewController: SecureVaultManagerDelegate { func secureVaultManager(_: SecureVaultManager, didRequestRuntimeConfigurationForDomain domain: String, completionHandler: @escaping (String?) -> Void) { let contentScopeProperties = ContentScopeProperties(gpcEnabled: AppDependencyProvider.shared.appSettings.sendDoNotSell, sessionKey: "", + messageSecret: "", featureToggles: ContentScopeFeatureToggles.supportedFeaturesOniOS) let runtimeConfig = DefaultAutofillSourceProvider.Builder(privacyConfigurationManager: ContentBlocking.shared.privacyConfigurationManager, diff --git a/DuckDuckGo/ScriptSourceProviding.swift b/DuckDuckGo/ScriptSourceProviding.swift index 99ed069329..0dc2f3334a 100644 --- a/DuckDuckGo/ScriptSourceProviding.swift +++ b/DuckDuckGo/ScriptSourceProviding.swift @@ -32,6 +32,7 @@ protocol ScriptSourceProviding { var autofillSourceProvider: AutofillUserScriptSourceProvider { get } var contentScopeProperties: ContentScopeProperties { get } var sessionKey: String { get } + var messageSecret: String { get } } @@ -45,6 +46,7 @@ struct DefaultScriptSourceProvider: ScriptSourceProviding { let autofillSourceProvider: AutofillUserScriptSourceProvider let contentScopeProperties: ContentScopeProperties let sessionKey: String + let messageSecret: String let privacyConfigurationManager: PrivacyConfigurationManaging let contentBlockingManager: ContentBlockerRulesManagerProtocol @@ -63,6 +65,7 @@ struct DefaultScriptSourceProvider: ScriptSourceProviding { surrogatesConfig = Self.buildSurrogatesConfig(contentBlockingManager: contentBlockingManager, privacyConfigurationManager: privacyConfigurationManager) sessionKey = Self.generateSessionKey() + messageSecret = Self.generateSessionKey() contentScopeProperties = ContentScopeProperties(gpcEnabled: appSettings.sendDoNotSell, sessionKey: sessionKey, featureToggles: ContentScopeFeatureToggles.supportedFeaturesOniOS) diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index 7e4bb51b8c..2f8e8f90b8 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -2976,6 +2976,7 @@ extension TabViewController: SecureVaultManagerDelegate { return ContentScopeProperties(gpcEnabled: appSettings.sendDoNotSell, sessionKey: autofillUserScript?.sessionKey ?? "", + messageSecret: autofillUserScript?.messageSecret ?? "", featureToggles: supportedFeatures) } From 335c72b090ac00634e531ab6ca6f01cb28f23263 Mon Sep 17 00:00:00 2001 From: Shane Osbourne Date: Tue, 19 Nov 2024 14:42:10 +0000 Subject: [PATCH 2/4] bump --- DuckDuckGo/ScriptSourceProviding.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/DuckDuckGo/ScriptSourceProviding.swift b/DuckDuckGo/ScriptSourceProviding.swift index 0dc2f3334a..9d1d79a2c4 100644 --- a/DuckDuckGo/ScriptSourceProviding.swift +++ b/DuckDuckGo/ScriptSourceProviding.swift @@ -68,6 +68,7 @@ struct DefaultScriptSourceProvider: ScriptSourceProviding { messageSecret = Self.generateSessionKey() contentScopeProperties = ContentScopeProperties(gpcEnabled: appSettings.sendDoNotSell, sessionKey: sessionKey, + messageSecret: messageSecret, featureToggles: ContentScopeFeatureToggles.supportedFeaturesOniOS) autofillSourceProvider = Self.makeAutofillSource(privacyConfigurationManager: privacyConfigurationManager, properties: contentScopeProperties) From e496fb88998da6dfd8d71551886138595d971eee Mon Sep 17 00:00:00 2001 From: Shane Osbourne Date: Tue, 19 Nov 2024 14:47:02 +0000 Subject: [PATCH 3/4] updated ref --- .../xcshareddata/swiftpm/Package.resolved | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 00552f87c2..d13e538471 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,7 +33,7 @@ "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { "branch" : "11-14-css_adding_a_new_messagesecret_properties_for_injected_scripts", - "revision" : "e52b8c7c20e2f4c16781f694a3d596dc8df4d201" + "revision" : "e424222d12d754fc9b973c6c2cfdeb00940d354f" } }, { @@ -122,8 +122,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/privacy-dashboard", "state" : { - "revision" : "53fd1a0f8d91fcf475d9220f810141007300dffd", - "version" : "7.1.1" + "revision" : "757bbbae1e2afbb421caee9bfca04ee5c56c3af8", + "version" : "7.2.0" } }, { From 32dfd99f7fbb7ad5b339dfd26dc77857a57ed898 Mon Sep 17 00:00:00 2001 From: Shane Osbourne Date: Tue, 19 Nov 2024 16:06:47 +0000 Subject: [PATCH 4/4] CSS: adding a new messageSecret properties for injected scripts --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 208120b3ca..1581ebb322 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11035,8 +11035,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { - branch = "11-14-css_adding_a_new_messagesecret_properties_for_injected_scripts"; - kind = branch; + kind = exactVersion; + version = 211.0.0; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d13e538471..cdb32f0f44 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "branch" : "11-14-css_adding_a_new_messagesecret_properties_for_injected_scripts", - "revision" : "e424222d12d754fc9b973c6c2cfdeb00940d354f" + "revision" : "7033b0d6f166ac8152cff602f1a1301641f4da60", + "version" : "211.0.0" } }, {