Projects tigase _server tigase-xmltools Issues #17
Invalid XML entity on whitespace characters (#17)
wojciech.kapcia@tigase.net opened 3 weeks ago

Martin reported issue with connecting over c2s to Tigase:

Somehow I have issues with c2s communication with tigase server:

<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
<?xml version='1.0'?><stream:stream from='mdosch@sure.im' to='sure.im' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='sure.im' id='04ed9605-4606-42c8-b107-45dd8f4d0799' version='1.0' xml:lang='en'>
<stream:features><sm xmlns="urn:xmpp:sm:3"/><pipelining  xmlns="urn:xmpp:features:pipelining"/><register xmlns="http://jabber.org/features/iq-register"/><csi xmlns="urn:xmpp:csi:0"/><ver xmlns="urn:xmpp:features:rosterver"/><sub xmlns="urn:xmpp:features:pre-approval"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session><c xmlns="http://jabber.org/protocol/caps" node="https://tigase.net/tigase-xmpp-server" ver="Q9k3Kk1U31Sp7XC7bCm4Q11CapM=" hash="SHA-1"/></stream:features>
<iq type='set' id='6bb453afd9e4e4f7'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>go-sendxmpp.be9ff3</resource></bind></iq>
<iq id="6bb453afd9e4e4f7" to="mdosch@sure.im/go-sendxmpp.be9ff3" xmlns="jabber:client" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>mdosch@sure.im/go-sendxmpp.be9ff3</jid></bind></iq>
<presence xml:lang='en'><show></show><status></status></presence>
<message to='martin@mdosch.de' type='chat' id='b9403145f47bd91e' xml:lang='en'><body>Die Kreise des wahren berühren sich unmittelbar, aber in den&#xA;Intermundien hat der Irrtum Raum genug, sich zu ergehen und zu walten.&#xA;&#x9;&#x9;-- Goethe, Maximen und Reflexionen, Nr. 957</body></message>
</stream:stream>
<stream:error xmlns:stream="http://etherx.jabber.org/streams"><not-well-formed xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>

It looks like the issue is with entities:

String input = "<body>&#xA;&#x9;&#x9;</body>";

yields:

Dec 12, 2024 2:09:38 PM tigase.xml.DomBuilderHandler error
WARNING: XML content parse error: Invalid XML entity
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
none
Sprints
n/a
Customer
n/a
Issue Votes (0)
Watchers (2)
Reference
tigase/_server/tigase-xmltools#17
Please wait...
Page is in error, reload to recover