diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2020-09-01 19:32:23 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2020-09-01 19:32:23 +0200 |
| commit | 2f64910cdad6769260014df27f7a690eecc9f5b7 (patch) | |
| tree | 04072a284697386ac8cc590cb1dc43d2d7a5104a | |
| parent | bb8173aefb3c75d7d21354ea3aec6142c68357dc (diff) | |
| parent | 74db229693e8dad5b341fbcf7945b864a28019e8 (diff) | |
| download | mullvadvpn-2f64910cdad6769260014df27f7a690eecc9f5b7.tar.xz mullvadvpn-2f64910cdad6769260014df27f7a690eecc9f5b7.zip | |
Merge branch 'percent-encode-pubkey'
| -rw-r--r-- | ios/MullvadVPN/MullvadRest.swift | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ios/MullvadVPN/MullvadRest.swift b/ios/MullvadVPN/MullvadRest.swift index de1b51067f..09e2760c37 100644 --- a/ios/MullvadVPN/MullvadRest.swift +++ b/ios/MullvadVPN/MullvadRest.swift @@ -462,7 +462,10 @@ struct PublicKeyPayload<Payload: RestPayload>: RestPayload { } func inject(into request: inout URLRequest) throws { - request.url = request.url?.appendingPathComponent(pubKey.base64EncodedString()) + let pathComponent = pubKey.base64EncodedString() + .addingPercentEncoding(withAllowedCharacters: .alphanumerics)! + + request.url = request.url?.appendingPathComponent(pathComponent) try payload.inject(into: &request) } } |
