• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

igniterealtime / Smack / #3192
40%

Build:
DEFAULT BRANCH: master
Ran 23 Jun 2024 07:30AM UTC
Jobs 1
Files 1284
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Jun 2024 07:07AM UTC coverage: 38.949% (+0.005%) from 38.944%
#3192

push

github

Flowdalic
[muc] Prevent duplicate processing of mediated invitations

MUC mediated invitations usually have the form

<message
    from='coven@chat.shakespeare.lit'
    id='nzd143v8'
    to='hecate@shakespeare.lit'>
  <x xmlns='http://jabber.org/protocol/muc#user'>
    <invite from='crone1@shakespeare.lit/desktop'>
      <reason>
        Hey Hecate, this is the place for all good witches!
      </reason>
    </invite>
    <password>cauldronburn</password>
  </x>
</message>
(source: XEP-0045 Example 57.)

However, previous versions of XEP-0045 specified an additional <x
xmlns='jabber:x:conference'> element to be included (see
implementation note in XEP-0045). Therefore, a legacy implementation
may emit a mediated invitations in the form of

<message
    from="smack-inttest-mediated-invite-from-8ta77-hw9igz@conference.example.org"
	to="smack-inttest-two-8ta77@example.org">
  <x xmlns="http://jabber.org/protocol/muc#user">
    <invite from="smack-inttest-one-8ta77@example.org"/>
  </x>
  <x xmlns="jabber:x:conference" jid="smack-inttest-mediated-invite-from-8ta77-hw9igz@conference.example.org"/>
</message>

Unfortunately, this matches
MultiUserChatManager.DIRECT_INVITATION_FILTER because
GroupChatInvitation matches <x xmlns="jabber:x:conference"/>. However
the message is not a direct invitation but a mediated one. Besides
this invoking the wrong listeners (direct vs. medidated) the value for
'inviter' that's used to invoke that listener will be false.

To fix this, extend DIRECT_INVITATION_FILTER with
NotFilter.of(MUCUser.class) to avoid matching those legacy mediated
invitations.

Fixes SMACK-943

Co-authored-by: Florian Schmaus <flo@geekplace.eu>

1 of 1 new or added line in 1 file covered. (100.0%)

153 existing lines in 2 files now uncovered.

16965 of 43557 relevant lines covered (38.95%)

0.39 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #3192.1 23 Jun 2024 07:30AM UTC 0
38.95
Source Files on build #3192
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #3192
  • 98dbc0ee on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc