matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
459 stars 147 forks source link

Channel permissions retained across IRC side disconnects #1498

Open andir opened 2 years ago

andir commented 2 years ago

Describe the bug

Users that are manually opped (e.g. not through means such as ChanServ) and subsequently disconnect from IRC they retain the Mod permissions on the Matrix side.

I believe this is one of the relevant configuration snippets:

        "membershipLists": {
          "enabled": true,
          "floodDelayMs": 0,
          "global": {
            "ircToMatrix": {
              "incremental": true,
              "initial": true,
              "requireMatrixJoined": true
            },
            "matrixToIrc": {
              "incremental": true,
              "initial": true,
              "requireMatrixJoined": true
            }
          }
        },

To Reproduce Steps to reproduce the behavior:

  1. Join a new IRC channel with an IRC client.
  2. Join the same IRC channel from matrix
  3. set +o on your matrix identity from your IRC client.
  4. Observe that you are now a Mod on the matrix side of the conversation.
  5. Send !reconnect to your appservice bridge DM
  6. On the matrix side you will still be a "Mod" but on the IRC side you are just a regular user.

Expected behavior Whenever the IRC connection is disconnected the permission level of Matrix users should be reset. Arguably a Matrix user should be removed from the Matrix channel when they disconnect from the IRC server (forcefully/voluntary). Especially when the server is configured with the incremental channel sync enabled.

Additional context Appservice IRC version: 0.30.0 (Looking at the diff https://github.com/matrix-org/matrix-appservice-irc/compare/0.30.0...0.32.1 it doesn't seem like any relevant parts have been touched in the meanwhile)

unbeatable-101 commented 2 years ago

I believe this has just happened to me with the snoonet-irc bridge