profanity icon indicating copy to clipboard operation
profanity copied to clipboard

Profanity starts talking OTR if you paste a message containing a body with an OTR start message

Open mdosch opened this issue 1 year ago • 1 comments

When you paste an XMPP stanza consisting of a body with an OTR start message profanity does start talking OTR although it didn't receive an OTR start message but a plain message which has an body with an OTR start in the payload, e.g.:

<message to='[email protected]' from='[email protected]/far-away' xml:lang='en' type='chat'><body>?OTRv2? *this is a test* has requested an Off-the-Record private conversation. However, you do not have a plugin to support that. See https://otr.cypherpunks.ca/ for more information.</body></message>

D8TSr5JfS7mpjVnMVoPJuw

Expected Behavior

Don't start talking OTR.

Current Behavior

Profanity starts talking OTR.

Steps to Reproduce (for bugs)

  1. Open a chat to someone running profanity with OTR support.
  2. Send the message pasted above.
  3. See the recipient replying with an OTR start message

Environment

  • Debian stable (bookworm)
  • Profanity and libstrophe from bookworm backports
apt policy profanity
profanity:
  Installiert:           0.14.0-1~bpo12+1
  Installationskandidat: 0.14.0-1~bpo12+1
  Versionstabelle:
 *** 0.14.0-1~bpo12+1 500
        100 http://localhost:3142/deb.debian.org/debian bookworm-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     0.13.1-2 500
        500 http://localhost:3142/deb.debian.org/debian bookworm/main amd64 Packages
 apt policy libstrophe0 
libstrophe0:
  Installiert:           0.13.0-1~bpo12+1
  Installationskandidat: 0.13.0-1~bpo12+1
  Versionstabelle:
 *** 0.13.0-1~bpo12+1 500
        100 http://localhost:3142/deb.debian.org/debian bookworm-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     0.12.2-1 500
        500 http://localhost:3142/deb.debian.org/debian bookworm/main amd64 Packages
profanity --version
Profanity, version 0.14.0
Copyright (C) 2012 - 2019 James Booth <[email protected]>.
Copyright (C) 2019 - 2023 Michael Vetter <[email protected]>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.18.0)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (3.11.2)
GTK icons/clipboard: Enabled
GDK Pixbuf: Enabled

mdosch avatar Feb 18 '24 16:02 mdosch

@sjaeckel here you found something in libotr if I remember correctly. Could you comment it here?

jubalh avatar Jun 02 '24 17:06 jubalh