profanity-im / profanity

Ncurses based XMPP client
https://profanity-im.github.io/
Other
1.31k stars 183 forks source link

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

Open mdosch opened 7 months ago

mdosch commented 7 months ago

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='someone@somewhere.com' from='someone@somewhere.else.com/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

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 <boothj5web@gmail.com>.
Copyright (C) 2019 - 2023 Michael Vetter <jubalh@iodoru.org>.
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
jubalh commented 4 months ago

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