Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(agent): xml of inventory is now decoded
Browse files Browse the repository at this point in the history
  • Loading branch information
DIOHz0r committed Jan 11, 2018
1 parent 1b93672 commit a73a1ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inc/agent.class.php
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/src/TestingCommonTools.php
Expand Up @@ -232,6 +232,6 @@ public static function AgentXmlInventory($serial, $macAddress = '', $deviceId =
</BATTERIES>
</CONTENT>
</REQUEST>";
return $xml;
return base64_encode($xml);
}
}

0 comments on commit a73a1ed

Please sign in to comment.