Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Update checks send no validator back to a feed
Țugui Dragoșe42cbc4acf12
diff --git a/Packages/PeelCore/Sources/PeelCore/Updates/UpdateChecker.swift b/Packages/PeelCore/Sources/PeelCore/Updates/UpdateChecker.swiftindex 67e7c286..922aa3ab 100644--- a/Packages/PeelCore/Sources/PeelCore/Updates/UpdateChecker.swift+++ b/Packages/PeelCore/Sources/PeelCore/Updates/UpdateChecker.swift@@ -6,8 +6,9 @@ public struct UpdateChecker: Sendable {private static let maximumFeedBytes = 4 * 1_024 * 1_024/// Settings for Peel's own session, used instead of the shared one: no cookies, no cache, and time limits.- /// A feed server should not set a cookie, read one left by another app's check, or hold a connection open.- private static var configuration: URLSessionConfiguration {+ /// A feed server should not set a cookie, read one left by another app's check, get back a validator it could+ /// make unique to this Mac, or hold a connection open.+ static var configuration: URLSessionConfiguration {let configuration = URLSessionConfiguration.ephemeralconfiguration.timeoutIntervalForRequest = 15configuration.timeoutIntervalForResource = 30diff --git a/Packages/PeelCore/Tests/PeelCoreTests/UpdatePrivacyTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/UpdatePrivacyTests.swiftindex d354670f..12c13f9a 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/UpdatePrivacyTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/UpdatePrivacyTests.swift@@ -1,5 +1,5 @@import Foundation-import PeelCore+@testable import PeelCoreimport Synchronizationimport Testing@@ -37,4 +37,13 @@ private final class RecordingProtocol: URLProtocol, @unchecked Sendable {#expect(await checker.status(for: sold, preference: .appStore) == .failed)#expect(RecordingProtocol.hosts.withLock { $0 } == ["itunes.apple.com"])}++ /// A feed server can make an `ETag` or a date unique to one Mac and read it back in the next request (RFC 9110,+ /// section 17.14), so the session keeps no cache that would send one back.+ @Test func keepsNothingAFeedServerCouldReadBack() {+ let configuration = UpdateChecker.configuration+ #expect(configuration.urlCache == nil)+ #expect(configuration.requestCachePolicy == .reloadIgnoringLocalCacheData)+ #expect(configuration.httpCookieStorage == nil)+ }}