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

Changing a user's power level can result in your own power level being lowered #24501

Open
Xiretza opened this issue Feb 12, 2023 · 1 comment
Labels
A-Power-Levels The permissions that users have in rooms and spaces O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@Xiretza
Copy link

Xiretza commented Feb 12, 2023

Steps to reproduce

I tried to lower a problematic user's power level as follows:

  1. click on their profile picture
  2. select "Custom level" in the "Power level" dropdown
  3. unrelated bug: try to enter -1, but the input does not accept -, so I either entered 0 or left the field blank
  4. press enter
  5. an m.room.power_levels event is sent, adding an entry for the user with level 0, and changing the entry for the own user from 100 to 50

For future reference:

event `$eOIZHbZLm0g4eCm1WGMQ47qrLfkweOzhmkAyY2D9FQ0` in `!H55QZaxP7zgghhx48z:computer.surgery`
{
  "type": "m.room.power_levels",
  "sender": "@xiretza:xiretza.xyz",
  "content": {
    "events": {
      "im.vector.modular.widgets": 50,
      "m.reaction": 0,
      "m.room.avatar": 50,
      "m.room.canonical_alias": 50,
      "m.room.encryption": 100,
      "m.room.history_visibility": 50,
      "m.room.name": 50,
      "m.room.pinned_events": 50,
      "m.room.power_levels": 50,
      "m.room.redaction": 0,
      "m.room.server_acl": 50,
      "m.room.tombstone": 100,
      "m.room.topic": 50,
      "m.space.child": 50
    },
    "users": {
      "@amanda:graven.dev": 50,
      "@benjamin:computer.surgery": 50,
      "@charles:computer.surgery": 100,
      "@erikj:jki.re": 50,
      "@jplatte:flipdot.org": 100,
      "@jplatte:matrix.org": 0,
      "@levans:safaradeg.net": 50,
      "@ruma_mod:flipdot.org": 50,
      "@tanriol:matrix.org": 50,
      "@tanriol:mozilla.org": 50,
      "@timokoesters:fachschaften.org": 50,
      "@xiretza:xiretza.xyz": 50,
      "@thedarkknightx:matrix.org": 0
    }
  },
  "state_key": "",
  "origin_server_ts": 1676208005679,
  "unsigned": {
    "replaces_state": "$dkAAOyNp-a9Fk7OHsi78O3tladXAQ1r8p32HnetUnRU",
    "prev_content": {
      "events": {
        "im.vector.modular.widgets": 50,
        "m.reaction": 0,
        "m.room.avatar": 50,
        "m.room.canonical_alias": 50,
        "m.room.encryption": 100,
        "m.room.history_visibility": 50,
        "m.room.name": 50,
        "m.room.pinned_events": 50,
        "m.room.power_levels": 50,
        "m.room.redaction": 0,
        "m.room.server_acl": 50,
        "m.room.tombstone": 100,
        "m.room.topic": 50,
        "m.space.child": 50
      },
      "users": {
        "@amanda:graven.dev": 50,
        "@benjamin:computer.surgery": 50,
        "@charles:computer.surgery": 100,
        "@erikj:jki.re": 50,
        "@jplatte:flipdot.org": 100,
        "@jplatte:matrix.org": 0,
        "@levans:safaradeg.net": 50,
        "@ruma_mod:flipdot.org": 50,
        "@tanriol:matrix.org": 50,
        "@tanriol:mozilla.org": 50,
        "@timokoesters:fachschaften.org": 50,
        "@xiretza:xiretza.xyz": 100
      }
    },
    "prev_sender": "@jplatte:flipdot.org",
    "age": 3147
  },
  "event_id": "$eOIZHbZLm0g4eCm1WGMQ47qrLfkweOzhmkAyY2D9FQ0",
  "room_id": "!H55QZaxP7zgghhx48z:computer.surgery"
}

Outcome

What did you expect?

Changing another user's power level does not demote me from Admin to Moderator.

What happened instead?

I think the latest change to m.room.power_levels before this happened may have been my promotion from 50 to 100, so maybe that was undone for some reason?

Operating system

Arch Linux

Application version

Element version: 1.11.20, Olm version: 3.2.12

How did you install the app?

No response

Homeserver

No response

Will you send logs?

Yes

@t3chguy
Copy link
Member

t3chguy commented Feb 13, 2023

Related #19285 #22178

@dbkr dbkr added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely A-Power-Levels The permissions that users have in rooms and spaces labels Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Power-Levels The permissions that users have in rooms and spaces O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants