diff --git a/inc/agent.class.php b/inc/agent.class.php index 94aec317..05b3e5f0 100644 --- a/inc/agent.class.php +++ b/inc/agent.class.php @@ -1003,7 +1003,7 @@ protected function enrollByInvitationToken($input) { $lastname = isset($input['lastname']) ? $input['lastname'] : null; $version = isset($input['version']) ? $input['version'] : null; $mdmType = isset($input['type']) ? $input['type'] : null; - $inventory = isset($input['inventory']) ? $input['inventory'] : null; + $inventory = isset($input['inventory']) ? base64_decode($input['inventory']) : null; $systemPermission = isset($input['has_system_permission']) ? $input['has_system_permission'] : 0; // For non-android agents, system permssion might be forced to 1 depending on the lack of such cosntraint diff --git a/tests/src/TestingCommonTools.php b/tests/src/TestingCommonTools.php index fb525e51..70040b5e 100644 --- a/tests/src/TestingCommonTools.php +++ b/tests/src/TestingCommonTools.php @@ -232,6 +232,6 @@ public static function AgentXmlInventory($serial, $macAddress = '', $deviceId = "; - return $xml; + return base64_encode($xml); } } \ No newline at end of file