fix: sync mobile gateway auth v3
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user