Add url encoding to provisioning call.

This commit is contained in:
Cody Henthorne
2024-10-15 12:14:41 -04:00
committed by Greyson Parrelli
parent 40bf7a021a
commit 4f61b2ad33

View File

@@ -684,7 +684,8 @@ public class PushServiceSocket {
}
public void sendProvisioningMessage(String destination, byte[] body) throws IOException {
makeServiceRequest(String.format(PROVISIONING_MESSAGE_PATH, destination), "PUT",
//noinspection CharsetObjectCanBeUsed
makeServiceRequest(String.format(PROVISIONING_MESSAGE_PATH, URLEncoder.encode(destination, StandardCharsets.UTF_8.name())), "PUT",
JsonUtil.toJson(new ProvisioningMessage(Base64.encodeWithPadding(body))));
}