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

Multiple roles with the same name are allowed in the database - this should not be allowed #3080

Closed
1 of 2 tasks
davidzwa opened this issue Apr 9, 2024 · 1 comment · Fixed by #3151
Closed
1 of 2 tasks
Assignees
Labels
bug Something isn't working
Milestone

Comments

@davidzwa
Copy link
Collaborator

davidzwa commented Apr 9, 2024

I was able to add multiple roles in the Role entity table with the same name. This could lead to undefined behaviour.

  • Prevent roles with the same name, if possible even with case insensitive mode
  • Additionally, ensure that the role is always inserted with uppercase letters (normalized)
@davidzwa davidzwa added the bug Something isn't working label Apr 9, 2024
@davidzwa davidzwa added this to the 1.6.2 milestone Apr 9, 2024
@davidzwa davidzwa self-assigned this Apr 10, 2024
@davidzwa davidzwa modified the milestones: 1.6.2, 1.7 Apr 16, 2024
@davidzwa
Copy link
Collaborator Author

I've found this bugfix to cause a breaking migration and therefore I had to remove roles that were duplicate by manual SQL in the migration. This means that roles are removed, although the only reason they were duplicate to begin with is manual tampering with the database.

Since this is a safe, but failure-prone migration, I'm going to postpone the issue from 1.6.2 to 1.7.0. The PR will be merged later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant