mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-04 19:29:41 +00:00
Validate server data before accessing it using a subscript. Fixes #2861
This commit is contained in:
1 parent
3eed5fe72a
commit
7a17c1e8aa
1 file changed
+3
-1
@@ -117,7 +117,9 @@ final class ReaderAPICaller: NSObject {
|
||||
var authData: [String: String] = [:]
|
||||
rawData.split(separator: "\n").forEach({ (line: Substring) in
|
||||
let items = line.split(separator: "=").map{String($0)}
|
||||
authData[items[0]] = items[1]
|
||||
if items.count == 2 {
|
||||
authData[items[0]] = items[1]
|
||||
}
|
||||
})
|
||||
|
||||
guard let authString = authData["Auth"] else {
|
||||
|
||||
Reference in new issue
Block a user