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 index out-of-bounds in startAttachingCrashLogMessages #3006

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13316,7 +13316,7 @@
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = "171.1.1-1";
version = "171.1.1-2";
};
};
9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/BrowserServicesKit",
"state" : {
"revision" : "eea55b8903389f680c4f08667d8f1428e12aa053",
"version" : "171.1.1-1"
"revision" : "ec7bfbcda3d18086a03d762c41382c318c699c8f",
"version" : "171.1.1-2"
}
},
{
Expand Down
18 changes: 0 additions & 18 deletions DuckDuckGo/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
@UserDefaultsWrapper(key: .firstLaunchDate, defaultValue: Date.monthAgo)
static var firstLaunchDate: Date

@UserDefaultsWrapper
private var didCrashDuringCrashHandlersSetUp: Bool

static var isNewUser: Bool {
return firstLaunchDate >= Date.weekAgo
}

override init() {
// will not add crash handlers and will fire pixel on applicationDidFinishLaunching if didCrashDuringCrashHandlersSetUp == true
let didCrashDuringCrashHandlersSetUp = UserDefaultsWrapper(key: .didCrashDuringCrashHandlersSetUp, defaultValue: false)
_didCrashDuringCrashHandlersSetUp = didCrashDuringCrashHandlersSetUp
if case .normal = NSApplication.runType,
!didCrashDuringCrashHandlersSetUp.wrappedValue {

didCrashDuringCrashHandlersSetUp.wrappedValue = true
CrashLogMessageExtractor.setUp()
didCrashDuringCrashHandlersSetUp.wrappedValue = false
}

do {
let encryptionKey = NSApplication.runType.requiresEnvironment ? try keyStore.readKey() : nil
fileStore = EncryptedFileStore(encryptionKey: encryptionKey)
Expand Down Expand Up @@ -390,10 +376,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate {

remoteMessagingClient?.startRefreshingRemoteMessages()

if didCrashDuringCrashHandlersSetUp {
PixelKit.fire(GeneralPixel.crashOnCrashHandlersSetUp)
didCrashDuringCrashHandlersSetUp = false
}
}

private func fireFailedCompilationsPixelIfNeeded() {
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/DataBrokerProtection/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let package = Package(
targets: ["DataBrokerProtection"])
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "171.1.1-1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "171.1.1-2"),
.package(path: "../SwiftUIExtensions"),
.package(path: "../XPCHelper"),
],
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/NetworkProtectionMac/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let package = Package(
.library(name: "VPNAppLauncher", targets: ["VPNAppLauncher"]),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "171.1.1-1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "171.1.1-2"),
.package(url: "https://github.com/airbnb/lottie-spm", exact: "4.4.3"),
.package(path: "../AppLauncher"),
.package(path: "../UDSHelper"),
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/SubscriptionUI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let package = Package(
targets: ["SubscriptionUI"]),
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "171.1.1-1"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "171.1.1-2"),
.package(path: "../SwiftUIExtensions")
],
targets: [
Expand Down
Loading