From 2c65d3c296110d6516e9f2f48c0871d14b3f61f3 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 19 Jan 2021 15:00:25 -0600 Subject: [PATCH] Escape plus sign for post http body. Fixes #2736 --- Account/Sources/Account/URLRequest+Account.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Account/Sources/Account/URLRequest+Account.swift b/Account/Sources/Account/URLRequest+Account.swift index 7f5fc81e2..18f0ee5c0 100755 --- a/Account/Sources/Account/URLRequest+Account.swift +++ b/Account/Sources/Account/URLRequest+Account.swift @@ -42,7 +42,7 @@ public extension URLRequest { URLQueryItem(name: "username", value: credentials.username), URLQueryItem(name: "password", value: credentials.secret), ] - httpBody = postData.percentEncodedQuery?.data(using: .utf8) + httpBody = postData.enhancedPercentEncodedQuery?.data(using: .utf8) case .newsBlurSessionId: setValue("\(NewsBlurAPICaller.SessionIdCookie)=\(credentials.secret)", forHTTPHeaderField: "Cookie") httpShouldHandleCookies = true @@ -54,7 +54,7 @@ public extension URLRequest { URLQueryItem(name: "Email", value: credentials.username), URLQueryItem(name: "Passwd", value: credentials.secret) ] - httpBody = postData.percentEncodedQuery?.data(using: .utf8) + httpBody = postData.enhancedPercentEncodedQuery?.data(using: .utf8) case .readerAPIKey: let auth = "GoogleLogin auth=\(credentials.secret)" setValue(auth, forHTTPHeaderField: HTTPRequestHeader.authorization)