Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can't invite prosody server admins to chatrooms in their server #1085

Closed
4 tasks done
lissine0 opened this issue Jun 17, 2024 · 3 comments
Closed
4 tasks done

Comments

@lissine0
Copy link
Contributor

What Monal Release channel are you using?

Alpha

iOS system version (if applicable)

16.7

macOS system version (if applicable)

No response

Monal version

6.4.0

Used XMPP server (domain)

personal server

Which XMPP-Server software are you using?

Prosody

XMPP Server Software Version

0.12.4

How many accounts are you using in Monal?

1

What happened?

In prosody, by default, admin accounts are granted owner affiliation in any chatroom they enter (that belongs to their server).
See https://prosody.im/doc/modules/mod_muc#admin-privileges

This results in an error when trying to invite a prosody server admin to a chatroom: Monal tries to grant them member affiliation, but they can only be owner.
The error message is:
Failed to change affiliation of 'admin@example.org' in 'room@conference.example.org' to 'member': not-acceptable

Note that what happens depends on when we try to invite the prosody admins:
-If we invite them at room creation, we see the error above, but they're added to the room with owner affiliation, as should be.
-If we invite them after the room was already created, we get the error above but the prosody admin is not added to the room.
Note that Gajim and Conversations handle this correctly i.e. the prosody admin gets added to the room as owner.

Anything else?

No response

FAQ

Considerations for XMPP users

XEP-Check

  • I have checked that at least XEP-198, XEP-0280, XEP-0352, XEP-0357, XEP-0313 and XEP-0163 are activated on my server and shown as 'green' under Settings --> Account--> (i) in advanced settings

Notifications-Menu

  • I have checked that all checkmarks are present under Settings --> Notifications
@tmolitor-stud-tu
Copy link
Member

Well, Monal adds the user to the group first (member affiliation) before sending out the direct invite and if that does not work, it does not send a (then useless) direct invite.

This prosody setting is a special case.
IMHO Prosody should accept any affiliation adding the admin to a muc they aren't already in and automatically promote them to owner. And only respond with an error message if the admin is already in the room (e.g. when it's a true affiliation change and not adding a new user).

Direct invites have the benefit that the inviter can be used to determine the trustworthiness of the invite (e.g. check if the inviter is in my roster before automatically entering the muc etc.).
Mediated invites can be spoofed --> a spammer's muc can just use any jid as the inviter.

@mwild1
Copy link

mwild1 commented Jun 18, 2024

We have been planning to deprecate this behaviour for some time - we made it optional in the last release, and the next release will now disable it by default: https://hg.prosody.im/trunk/rev/3e6d5738ea09

This change won't be backported to 0.12, though a new major release is not far away.

bjc pushed a commit to bjc/prosody that referenced this issue Jun 18, 2024
This change has various technical and social benefits. If ownership of a MUC
is really needed, it can be gained using the 'Set affiliation' ad-hoc command
or prosodyctl shell.

Example client incompatibility with the old behaviour:

  - monal-im/Monal#1085
@tmolitor-stud-tu
Copy link
Member

Since is's now fixed on the prosody side, I'll close this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants