OCSInventory-NG / AndroidAgent

OCS Inventory NG Android Agent
http://www.ocsinventory-ng.org/en/
GNU General Public License v2.0
28 stars 23 forks source link

Sim card provider 1&1 causes malformed XML file #35

Open gandi1791 opened 2 years ago

gandi1791 commented 2 years ago

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Android version : 11

OCS Inventory informations

Android agent version : 2.7

Problem's description

Agent creates file, where section contains tag with name of SIM card provider, in my case "1&1".

part of XML:

26207 de 1&1

XML is not usable as "&" causes malforming of the XML file. This is not accepted by apache.

log entry of apache: [perl:error] [pid 34782] [client 192.168.178.134:44608] \nnot well-formed (invalid token) at line 163, column 16, byte 4427 at /usr/lib/x86_64-linux-gnu/perl5/5.32/XML/Parser.pm line 187.\nXML::Simple called at /usr/local/share/perl/5.32.1/Apache/Ocsinventory.pm line 218.\n

other devices without SIM card (Tablet, windows clients, ...) could be inventoried without issues.

gandi1791 commented 2 years ago

Copied source, modified java and created apk with hardcoded value for sim card operator name... works....