#1111 closed defect (fixed)

Opportunistic OTR tries to establish an OTR session with _xmlconsole

Reported by: dx Owned by: pesco
Priority: minor Milestone:
Component: OTR Version: 3.2
Keywords: Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro:


It notices the magic whitespace pattern in the TX messages, and decides it would be a great idea to send to that contact the "?OTR:" string. Since _xmlconsole is a special debugging contact that can send raw messages to the XMPP server, some servers disconnect the user with "Stream error: xml-not-well-formed"

Both OTRv3 and OTRv4 builds are affected. Relatively rare/minor bug so i'm not sure if there's a point in backporting a fix for OTRv3.

(Sorry pesco for the spam!)

Attachments (0)

Change History (7)

comment:1 Changed at 2014-01-12T20:43:02Z by dx

Probably related, #818

comment:2 Changed at 2014-01-15T15:20:38Z by mhellwig@…

FYI in case more logs or whatever are needed, this is how it was discovered:

xmlconsole on, connect, attempt to send a message to a contact. (contact is robelix@… , my own host is where bitlbee runs AND where prosody runs .. so that might make things a bit ambiguous in logs) what happens:

in root window:

10:47 <@root> jabber3 - Error: Stream error: not-well-formed
10:47 <@root> jabber3 - Signing off..   
10:47 -!- Netsplit <-> quits: +robelix2   
10:47 <@root> jabber3 - Error: Short write() to server   

in xmlconsole:

10:47 <_xmlconsole> TX: <message type="chat" to=""><body>ein Test</body></message> 
10:47 <_xmlconsole> RX: <stream:error><not-well-formed xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error> 

in the prosody debug logs:

Jan 10 10:47:00 mod_c2s debug Received invalid XML (not well-formed (invalid token)) 463 bytes: ?OTR:AAIKAAAAwNppmoOr4ArJFR+B1yWzdcTehfuqEtwLprkWzc9jqj7NEWwcJTpAopS3/suFcm6BaY2d7JS5FeMYt8LqUseJU9LtV/PNOMsaAkczVhZka4tXgjq9r2KYDX9PvYBoWdRonW7GxK8z0gMTGHiHH3VvkcrvBB5HoM+HkopXBTKQMEe7SS5wlFHy6NpTATlCftAjNHS7PuW6OKyCAgz8/odBnxzcFhe9AgEgzYpToM7LbBLJhbJ/M+VzpuvuoGF+B7ifag==._UAAAAQ_______?OTR:AAIKAAA 
Jan 10 10:47:00 c2s8dc430 debug Disconnecting client, <stream:error> is: <stream:error><not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error> 
Jan 10 10:47:00 c2s8dc430 info c2s stream for closed: not-well-formed 
Jan 10 10:47:00 c2s8dc430 debug Destroying session for ( not-well-formed 
Jan 10 10:47:00 sessionmanager debug All resources of eye are now offline 
Jan 10 10:47:00 c2s8dc430 debug Received[c2s]: <presence type='unavailable'> 
Jan 10 10:47:00 stanzarouter debug Routing to remote...

comment:3 Changed at 2014-02-07T16:11:29Z by pesco

Well, I don't know, maybe xmlconsole should just bypass plugins?

comment:4 Changed at 2014-02-07T16:13:17Z by pesco

This is actually what's going on in #875.

comment:5 Changed at 2014-02-07T19:35:09Z by dx

Yay duplicates.

I guess we need some sort of flag that some contacts aren't real contacts. For example, we also have the temporary oauth contacts that just display a url and wait for a single reply.

comment:6 Changed at 2015-02-27T20:15:04Z by Matěj Cepl <mcepl@…>

adding myself to CC.

Modify Ticket

as closed The owner will remain pesco.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.