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

Mjolnir crashes when acceptInvitesFromSpace isn't set. #436

Closed
JokerGermany opened this issue Nov 24, 2022 · 0 comments · Fixed by #451
Closed

Mjolnir crashes when acceptInvitesFromSpace isn't set. #436

JokerGermany opened this issue Nov 24, 2022 · 0 comments · Fixed by #451

Comments

@JokerGermany
Copy link

JokerGermany commented Nov 24, 2022

This was the Problem and Conversation in the mjolnir Matrix Room

It looks like when acceptInvitesFromSpace isn't set, that mjolnir crashes when someone invites mjolnir to a room.

Nov 24 12:34:44 myhost node[0000]: Thu, 24 Nov 2022 11:34:44 GMT [ERROR] [MatrixHttpClient] (REQ-609) [Error: Error during MatrixClient request GET /_matrix/client/v3/rooms/!noop%3Aexample.org/joined_members: 403 Forbidden -- {"errcode":"M_FORBIDDEN","error":"User @modbot:tchncs.de not in room !noop:example.org, and room previews are disabled"}]
Nov 24 12:34:44 myhost node[0000]: Thu, 24 Nov 2022 11:34:44 GMT [ERROR] [Mjolnir] Mjolnir is not in the space configured for acceptInvitesFromSpace, did you invite it?
Nov 24 12:34:44 myhost node[0000]: Thu, 24 Nov 2022 11:34:44 GMT [ERROR] [MatrixHttpClient] (REQ-613) [Error: Error during MatrixClient request POST /_matrix/client/v3/join/!noop%3Aexample.org: 404 Not Found -- {"errcode":"M_UNKNOWN","error":"Can't join remote room because no servers that are in the room have been provided."}]
Nov 24 12:34:44 myhost node[0000]: node:internal/process/promises:279
Nov 24 12:34:44 myhost node[0000]:             triggerUncaughtException(err, true /* fromPromise */);
Nov 24 12:34:44 myhost node[0000]:             ^
Nov 24 12:34:44 myhost node[0000]: [Error: Error during MatrixClient request POST /_matrix/client/v3/join/!noop%3Aexample.org: 404 Not Found -- {"errcode":"M_UNKNOWN","error":"Can't join remote room because no servers that are in the room have been provided."}]

( https://matrix.to/#/!WpbOWAblxueZXAAnjj:matrix.org/$Y4Pk74aANrFXOj5fn5O0S1oBFV1hOlXOTFmXssVInWc?via=matrix.org&via=envs.net&via=element.io )

Looks like it falls back to !noop:example.org then:

acceptInvitesFromSpace: '!noop:example.org',

A curiosity:
Looks like when you have still acceptInvitesFromGroup in the config, it works, too.
( https://matrix.to/#/!WpbOWAblxueZXAAnjj:matrix.org/$3qSG_Oa9-lZf59cB3s2Z5lqgMd_w7A5WrPoZdgNP9n8?via=matrix.org&via=envs.net&via=element.io )

Gnuxie added a commit that referenced this issue Dec 7, 2022
Also assert that we if `autojoinOnlyIfManager` is enabled that
the user has provided a space for `acceptInvitesFromSpace`.
It does sound like `autojoinOnlyIfManager` would imply that
anyone could send an invitation to the mjolnir if
`autojoinONlyIfManager` is false.
This has never been the case though, and it is not sensible
either, especially if `protectAllJoinedRooms` is also true.

This setting has confused users in #mjolnir:matrix.org before
Closes #436.

Also fixes an issue in the appservice where we require
`autojoinOnlyIfManager` to always be explicitly set to false
or it crashes any Mjolnir receiving an invite.
Gnuxie added a commit that referenced this issue Dec 7, 2022
Also assert that we if `autojoinOnlyIfManager` is enabled that
the user has provided a space for `acceptInvitesFromSpace`.
It does sound like `autojoinOnlyIfManager` would imply that
anyone could send an invitation to the mjolnir if
`autojoinONlyIfManager` is false.
This has never been the case though, and it is not sensible
either, especially if `protectAllJoinedRooms` is also true.
Additionally the documentation in `config/default.yaml`
has always claimed that `autojoinOnlyIfManager` is "true by default".

This setting has confused users in #mjolnir:matrix.org before
Closes #436.

Also fixes an issue in the appservice where we require
`autojoinOnlyIfManager` to always be explicitly set to false
or it crashes any Mjolnir receiving an invite.
Gnuxie added a commit that referenced this issue Dec 7, 2022
Also assert that we if `autojoinOnlyIfManager` is enabled that
the user has provided a space for `acceptInvitesFromSpace`.
It does sound like `autojoinOnlyIfManager` would imply that
anyone could send an invitation to the mjolnir if
`autojoinONlyIfManager` is false.
This has never been the case though, and it is not sensible
either, especially if `protectAllJoinedRooms` is also true.
Additionally the documentation in `config/default.yaml`
has always claimed that `autojoinOnlyIfManager` is "true by default".

This setting has confused users in #mjolnir:matrix.org before
Closes #436.

Also fixes an issue in the appservice where we require
`autojoinOnlyIfManager` to always be explicitly set to false
or it crashes any Mjolnir receiving an invite.
Gnuxie added a commit that referenced this issue Dec 7, 2022
Also assert that we if `autojoinOnlyIfManager` is enabled that
the user has provided a space for `acceptInvitesFromSpace`.
It does sound like `autojoinOnlyIfManager` would imply that
anyone could send an invitation to the mjolnir if
`autojoinONlyIfManager` is false.
This has never been the case though, and it is not sensible
either, especially if `protectAllJoinedRooms` is also true.
Additionally the documentation in `config/default.yaml`
has always claimed that `autojoinOnlyIfManager` is "true by default".

This setting has confused users in #mjolnir:matrix.org before
Closes #436.

Also fixes an issue in the appservice where we require
`autojoinOnlyIfManager` to always be explicitly set to false
or it crashes any Mjolnir receiving an invite.
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

Successfully merging a pull request may close this issue.

1 participant