[Trac_gajim-plugins] [Gajim Plugins] #97: OTR plugin changes content of <body> element

Gajim Plugins trac at gajim.org
Wed Aug 20 11:18:24 CEST 2014

#97: OTR plugin changes content of <body> element
Reporter:  Flow    |       Owner:  afflux
    Type:  defect  |      Status:  new
Priority:  major   |   Component:  OffTheRecordPlugin
Keywords:          |  Blocked By:
Blocking:          |
 When I send a command from Gajim to [[http://projectmaxs.org|MAXS]], then
 the first attempt will fail. It seems the OTR plugin adds extra whitespace
 to the body element. As soon as I disable the OTR plugin, the behavior can
 no longer be observed.

 If I send for example the `ls` command

 [11:03:43] ‎flo‎: ls ✓
 ‎[11:03:44] ‎My Droid‎: No such file or directory:

 Then the resulting `message` stanza will contain extra whitespace after
 the actual entered text:

 <message xmlns="jabber:client" to="xxx at geekplace.eu" type="chat"
 <request xmlns="urn:xmpp:receipts" />

 Now, if I do the same just a few seconds later, then the whitespace will
 be gone

 ‎[11:03:53] ‎flo‎: ls ✓
 ‎[11:03:53] ‎My Droid‎: Content of /storage/emulated/0/MAXS
 /storage/emulated/0/MAXS/foo.pdf 22.7 KiB

 <message xmlns="jabber:client" to="xxx at geekplace.eu/MAXS" type="chat"
 <request xmlns="urn:xmpp:receipts" />

 I'm not sure *why* the whitespace is added, I can only assume that it's
 part of the OTR specification and related to negotiation. If this is in
 fact the case, then the OTR XMPP protocol seems to be poorly designed.
 Instead of modifying the body element, an extra message extension should
 be used, which would be transparent for entities not supporting it.

 Is there a OTR XMPP specification somewhere? How do e.g. Gajim's OTR
 plugin and ChatSecure agree on a protocol?
 Is there a way to prevent the OTR plugin from adding extra whitespace
 without disabling it?

Ticket URL: <http://trac-plugins.gajim.org/ticket/97>
Gajim Plugins <http://trac-plugins.gajim.org/>
Gajim Plugins

More information about the Trac_gajim-plugins mailing list