1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00
Go to file
aszlig b1e960cfae
omemo: Check stanza names when iterating nodes
Some clients (eg. PSI) are sending the stanzas delimited by whitespace
text nodes, which will fail while looping through the <prekeys/>
children and also print weird errors when iterating through the <list/>
of devices.

When debugging this, I was looking at the XML of Gajim and PSI and first
was somehow confused why Profanity printed "OMEMO: received device
without ID" while the XML looked identical (minus the actual IDs and the
JIDs of course).

However, Gajim was sending the XML without whitespace nodes in between
and PSI did not, so for example the following (with the relevant
whitespace nodes marked with X):

  <message type="headline" to="..." from="...">
    <event xmlns="http://jabber.org/protocol/pubsub#event">
      <items type="headline" node="eu.siacs.conversations.axolotl.devicelist">
        <item id="...">
          <list xmlns="eu.siacs.conversations.axolotl">
          X <device id="..."/>
          X <device id="..."/> X
          </list>
        </item>
      </items>
    </event>
    <delay xmlns="urn:xmpp:delay" stamp="..." from="..."/>
  </message>

... would result in three times the "OMEMO: received device without ID"
error, because we actually have three XML text nodes here that obviously
don't have an "id" attribute.

Now since the <list/> children above aren't really a problem and only
annoying, text nodes in the <prekeys/> stanza actually cause
omemo_start_device_session_handle_bundle to return failure.

I've fixed this by explicitly matching the stanza names we are
interested in, skipping everything else.

Signed-off-by: aszlig <aszlig@nix.build>
Reported-by: @devhell
2019-10-29 23:10:07 +01:00
.github Dont allow new issues 2019-10-22 11:13:41 +02:00
apidocs Update copyright 2018-01-21 15:00:02 +00:00
docs Possibility to specify alternative config file 2019-08-02 15:55:47 +02:00
icons better, final icons 2016-03-09 12:55:57 +01:00
src omemo: Check stanza names when iterating nodes 2019-10-29 23:10:07 +01:00
tests Adjust message stubs in unit tests 2019-10-29 11:55:27 +01:00
themes Make forest theme more readable 2019-10-22 15:10:55 +02:00
.gitignore Update plugin API docs 2016-08-02 23:17:28 +01:00
.travis.yml Add Travis CI tests for Arch, Debian and OSX/macOS 2019-06-06 13:58:26 +02:00
bootstrap.sh Add Travis CI tests for Arch, Debian and OSX/macOS 2019-06-06 13:58:26 +02:00
Brewfile.travis Add cmocka to brewfile 2019-07-18 09:07:57 +02:00
CHANGELOG Fix typo 2019-09-24 12:37:00 +02:00
configure-debug Include python plugins by default in build 2016-07-24 01:34:02 +01:00
configure-plugins Added python plugins code 2016-02-24 00:31:55 +00:00
configure.ac Adjust tray configure switch to also include clipboard 2019-10-29 15:20:57 +01:00
CONTRIBUTING.md Add CONTRIBUTING.md 2019-07-23 09:25:17 +02:00
COPYING Added GPL 2012-02-20 20:07:38 +00:00
Dockerfile.arch Add Travis CI tests for Arch, Debian and OSX/macOS 2019-06-06 13:58:26 +02:00
Dockerfile.debian Add Travis CI tests for Arch, Debian and OSX/macOS 2019-06-06 13:58:26 +02:00
Dockerfile.tumbleweed Add Travis CI tests for Arch, Debian and OSX/macOS 2019-06-06 13:58:26 +02:00
LICENSE.txt Update copyright years 2019-04-24 01:08:38 +02:00
Makefile.am Adjust tray configure switch to also include clipboard 2019-10-29 15:20:57 +01:00
prof.supp Dirty fix libgcrypt memleak 2019-07-11 14:25:42 +02:00
profanity.spec Update version in spec file 2019-09-30 19:17:07 +02:00
profrc.example Added example profrc config 2014-06-29 22:58:33 +01:00
README.md Update travis URL 2019-05-03 10:59:39 +02:00
RELEASE_GUIDE.md Update website info in release guide 2019-07-31 12:02:09 +02:00
theme_template Add option to hilight unread rooms in /wins command 2019-10-12 13:03:14 +02:00
travis-build.sh travis: show log in case make check failed 2019-10-10 19:10:55 +02:00

Profanity Build Status

Profanity is a console based XMPP client inspired by Irssi,

alt tag

See the User Guide for information on installing and using Profanity.

Homepage: https://profanity-im.github.io/

Mailing List: https://groups.google.com/forum/#!forum/profanitydev

MUC: profanity@rooms.dismail.de

Plugins repository: https://github.com/profanity-im/profanity-plugins