From 883fa797d488beecc097ab4b18f2f2979fe48865 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Wed, 21 Oct 2026 18:30:50 -0700 Subject: [PATCH] Fix reachable security issues found in the audit --- mac/Sources/Byre/Pages.swift | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mac/Sources/Byre/Pages.swift b/mac/Sources/Byre/Pages.swift index 457b354..3ba920f 100644 --- a/mac/Sources/Byre/Pages.swift +++ b/mac/Sources/Byre/Pages.swift @@ -164,7 +164,20 @@ private final class PageListener: @unchecked Sendable { } private func serve(_ conn: NWConnection, _ head: String) { - let parts = head.components(separatedBy: "\r\n")[0].split(separator: " ") + let lines = head.components(separatedBy: "\r\n") + let hosts = lines.dropFirst().compactMap { line -> String? in + guard let colon = line.firstIndex(of: ":"), line[..