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

Powerlevel allows illegal characters in the user identifier #201

Closed
MichaelSasser opened this issue Jan 27, 2022 · 2 comments
Closed

Powerlevel allows illegal characters in the user identifier #201

MichaelSasser opened this issue Jan 27, 2022 · 2 comments

Comments

@MichaelSasser
Copy link

Describe the bug
!mjolnir powerlevel does not check for illegal characters in the user identifier. If I remember that correctly, only lowercase letters, numbers, underscores, and dashes are allowed.

To Reproduce
It is possible to set the powerlevel using a user identifier with illegal characters. (Tested with mjolnir v1.2.1)

  1. !mjolnir powerlevel @FooBarBaz:matrix.org 50 (Uppercase letters are not allowed, I haven't tested other characters)
  2. See room roles & permissions

Expected behavior
The bot should throw an error.

@MichaelSasser MichaelSasser changed the title Powerlevel allows illegal characters Powerlevel allows illegal characters in the user identifier Jan 27, 2022
@tulir
Copy link
Member

tulir commented Jan 27, 2022

Note that uppercase letters are allowed in historical user IDs (meaning there are real users with uppercase user IDs), and arbitrary unicode is allowed in user IDs over federation (meaning a server admin could create user IDs with any unicode characters and other servers will accept them). See also: matrix-org/matrix-spec-proposals#2828

@MichaelSasser
Copy link
Author

Thanks for your detailed response. Since this is a feature, I close the issue.

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

2 participants