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

Potential Fix for issue #666 #667

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
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 Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -3324,7 +3324,7 @@
"sv" : {
"stringUnit" : {
"state" : "translated",
"value" : "Nödvändiga Datumet:"
"value" : "Sista datum:"
}
},
"uk" : {
Expand Down
6 changes: 3 additions & 3 deletions Nudge/UI/Main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,17 @@ class AppDelegate: NSObject, NSApplicationDelegate {
allVersions.sort { VersionManager.versionLessThan(currentVersion: $0, newVersion: $1) }

// Filter versions between current and selected OS version
let filteredVersions = VersionManager().removeDuplicates(from: allVersions.filter {
var filteredVersions = VersionManager().removeDuplicates(from: allVersions.filter {
VersionManager.versionGreaterThanOrEqual(currentVersion: $0, newVersion: currentInstalledVersion) &&
VersionManager.versionLessThanOrEqual(currentVersion: $0, newVersion: selectedOSVersion)
})
// Remove the current installed version from filteredVersions
filteredVersions.removeAll(where: {$0 == currentInstalledVersion} )

// Filter versions with the same major version as the current installed version
var minorVersions = VersionManager().removeDuplicates(from: filteredVersions.filter { version in
VersionManager.getMajorVersion(from: version) == currentMajorVersion
})
// Remove the current installed version from minorVersions
minorVersions.removeAll { $0 == currentInstalledVersion }

// Count actively exploited CVEs in the filtered versions
LogManager.notice("Assessing macOS version range for active exploits: \(filteredVersions) ", logger: sofaLog)
Expand Down