fix: sync mobile gateway auth v3

This commit is contained in:
Peter Steinberger
2026-01-20 13:30:30 +00:00
parent a4d1c4d522
commit fa51294f65
11 changed files with 173 additions and 37 deletions

View File

@@ -498,7 +498,7 @@ public actor GatewayChannelActor {
}
}
private func decodeMessageData(_ msg: URLSessionWebSocketTask.Message) -> Data? {
private nonisolated func decodeMessageData(_ msg: URLSessionWebSocketTask.Message) -> Data? {
let data: Data? = switch msg {
case let .data(data): data
case let .string(text): text.data(using: .utf8)

View File

@@ -108,5 +108,9 @@ private func sha256Hex(_ data: Data) -> String {
}
private func normalizeFingerprint(_ raw: String) -> String {
raw.lowercased().filter(\.isHexDigit)
let stripped = raw.replacingOccurrences(
of: #"(?i)^sha-?256\s*:?\s*"#,
with: "",
options: .regularExpression)
return stripped.lowercased().filter(\.isHexDigit)
}