From 2605ff9da25af480da34ab2b246ce00f18300b79 Mon Sep 17 00:00:00 2001 From: Rafa Hernandez Date: Mon, 11 Jun 2018 13:12:12 -0400 Subject: [PATCH] fix(enroll): fix payload base 64 encode Signed-off-by: Rafa Hernandez --- app/src/main/java/org/flyve/mdm/agent/utils/Helpers.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/flyve/mdm/agent/utils/Helpers.java b/app/src/main/java/org/flyve/mdm/agent/utils/Helpers.java index 20b04cf04d..ea7d0d5474 100644 --- a/app/src/main/java/org/flyve/mdm/agent/utils/Helpers.java +++ b/app/src/main/java/org/flyve/mdm/agent/utils/Helpers.java @@ -338,6 +338,7 @@ public static String base64encode(String text) { byte[] data = text.getBytes("UTF-8"); rtext = Base64.encodeToString(data, Base64.NO_WRAP | Base64.URL_SAFE); rtext = rtext.replaceAll("-", "+"); + rtext = rtext.replaceAll(" ", "+"); } catch (UnsupportedEncodingException e) { FlyveLog.e(e.getMessage()); }