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

Roles.userIsInRole without role returns true #204

Closed
idanwe opened this issue Jul 8, 2016 · 6 comments
Closed

Roles.userIsInRole without role returns true #204

idanwe opened this issue Jul 8, 2016 · 6 comments

Comments

@idanwe
Copy link

idanwe commented Jul 8, 2016

I'm using enum for my defined roles.
And at one place I misspelled a role UserRole.Supervisor instead of UserRoe.SUPERVISOR
then I found that Roles.userIsInRole(this.userId, undefined, 'real-madrid') returns true.
e.g.

  Roles.addUsersToRoles(userId, UserRole.SUPERVISON, 'barcelona');
  Roles.userIsInRole(userId, UserRole.Supervison, 'real-madrid'); // Supervisor is misspelled lowercase
  > true 

I found it as a security vulnerability.

Do you have some best practice to avoid it?
Is it in purpose?

@mitar
Copy link
Member

mitar commented Jul 8, 2016

Which version are you using? 1.0 or 2.0?

@idanwe
Copy link
Author

idanwe commented Jul 8, 2016

alanning:[email protected]

@idanwe
Copy link
Author

idanwe commented Jul 10, 2016

@mitar What is the status of v2?

@mitar
Copy link
Member

mitar commented Jul 10, 2016

I think it is ready, but it is waiting for @alanning to release it (or release at least release candidate).

@mitar
Copy link
Member

mitar commented Oct 2, 2016

I made a test for 2.0 in c5e27a8 and it is returning false for unknown roles.

@mitar
Copy link
Member

mitar commented Oct 2, 2016

And for 1.0 I made e486f5a. I cannot reproduce what you are reporting here, so I think you have an issue on your side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants