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

v2.0.9 #643

Merged
merged 2 commits into from
Aug 16, 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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.9] - 2024-08-16
Requires macOS 12.0 and higher.

### Fixed
- When using `latest` or `latest-supported`, major upgrades were not correctly assessed, resulting in SLA extensions defaulting to the `90` day SLA default value

### Changed
- Additional Japenese localization changes

## [2.0.8] - 2024-08-16
Requires macOS 12.0 and higher.

Expand Down
4 changes: 2 additions & 2 deletions Nudge.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.0.8;
MARKETING_VERSION = 2.0.9;
PRODUCT_BUNDLE_IDENTIFIER = com.github.macadmins.Nudge;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -729,7 +729,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.0.8;
MARKETING_VERSION = 2.0.9;
PRODUCT_BUNDLE_IDENTIFIER = com.github.macadmins.Nudge;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 2 additions & 2 deletions Nudge/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>2.0.8</string>
<string>2.0.9</string>
<key>CFBundleVersion</key>
<string>2.0.8</string>
<string>2.0.9</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
11 changes: 7 additions & 4 deletions Nudge/UI/Main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,17 @@ class AppDelegate: NSObject, NSApplicationDelegate {

let presentCVEs = selectedOS!.cves.count > 0
let slaExtension: TimeInterval
// Start setting UI fields
nudgePrimaryState.requiredMinimumOSVersion = selectedOS!.productVersion
nudgePrimaryState.sofaAboutUpdateURL = selectedOS!.securityInfo
nudgePrimaryState.activelyExploitedCVEs = activelyExploitedCVEs
switch (activelyExploitedCVEs, presentCVEs, AppStateManager().requireMajorUpgrade()) {
case (false, true, true):
slaExtension = TimeInterval(OSVersionRequirementVariables.nonActivelyExploitedCVEsMajorUpgradeSLA * 86400)
case (false, true, false):
slaExtension = TimeInterval(OSVersionRequirementVariables.nonActivelyExploitedCVEsMinorUpdateSLA * 86400)
case (true, false, true): // The selected major upgrade does not have CVEs, but the old OS does
slaExtension = TimeInterval(OSVersionRequirementVariables.activelyExploitedCVEsMajorUpgradeSLA * 86400)
case (true, true, true):
slaExtension = TimeInterval(OSVersionRequirementVariables.activelyExploitedCVEsMajorUpgradeSLA * 86400)
case (true, true, false):
Expand All @@ -271,6 +277,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
case (false, false, false):
slaExtension = TimeInterval(OSVersionRequirementVariables.standardMinorUpdateSLA * 86400)
default: // If we get here, something is wrong, use 90 days as a safety
LogManager.warning("SLA Extension logic failed, using 90 days as a safety", logger: sofaLog)
slaExtension = TimeInterval(90 * 86400)
}

Expand All @@ -280,10 +287,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
LogManager.notice("SOFA Actively Exploited CVEs: \(activelyExploitedCVEs)", logger: sofaLog)

// Start setting UI fields
nudgePrimaryState.requiredMinimumOSVersion = selectedOS!.productVersion
nudgePrimaryState.sofaAboutUpdateURL = selectedOS!.securityInfo
nudgePrimaryState.activelyExploitedCVEs = activelyExploitedCVEs
releaseDate = selectedOS!.releaseDate ?? Date()
if requiredInstallationDate == Date(timeIntervalSince1970: 0) {
if OSVersionRequirementVariables.minorVersionRecalculationThreshold > 0 {
Expand Down