From a759731ebad80cdadd9204f54ebb3b0d99a1adad Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 15 Apr 2024 22:19:24 -0400 Subject: [PATCH] Fix push notifications not working when account ID contains slashes --- .../Sources/PushNotifications/PushManagerImpl.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/PushNotifications/Sources/PushNotifications/PushManagerImpl.swift b/Packages/PushNotifications/Sources/PushNotifications/PushManagerImpl.swift index 8cdf477f32..5db5ae7e1d 100644 --- a/Packages/PushNotifications/Sources/PushNotifications/PushManagerImpl.swift +++ b/Packages/PushNotifications/Sources/PushNotifications/PushManagerImpl.swift @@ -71,7 +71,7 @@ class PushManagerImpl: _PushManager { private func endpointURL(deviceToken: Data, accountID: String) -> URL { var endpoint = URLComponents(url: endpoint, resolvingAgainstBaseURL: false)! - let accountID = accountID.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)! + let accountID = accountID.addingPercentEncoding(withAllowedCharacters: .alphanumerics)! endpoint.path = "/push/v1/\(apnsEnvironment)/\(deviceToken.hexEncodedString())/\(accountID)" return endpoint.url! }