-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Permission with empty HTTP path matches all routes #5739
Comments
Use route groups.
…On Mon, Mar 20, 2023 at 7:01 AM anxgstadler ***@***.***> wrote:
I have a permission that is not restricted to any path. It merely exists
so I can check in the code at different places if a user has this
permission or not. Therefore, I have left the field "HTTP path" empty.
The result is that every user who has this permission, also has access to
every other path - even things like /admin/auth/users or /admin/auth/roles!
It seems that an empty HTTP path always matches any given path.
This is at least a grave design error, if not a major security risk.
—
Reply to this email directly, view it on GitHub
<#5739>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALF5SJHUWPAITBWAC5D54X3W5A2JLANCNFSM6AAAAAAWA5ODTI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I might not be experienced enough in Laravel to see how your reply solves my issue? I'm talking solely about Laravel Admin itself. When you create a new permission, leave the HTTP path empty, and give the permission to a role that is otherwise farily restricted, users with this role then get access to each and ever page. |
Hi. I think you're right, that is weird behavior, especially as it's not marked nor explained anywhere in the docs or in the code. |
Yes, I went with the "fake route" solution in the meantime. Thanks for the PR! :-) |
I have a permission that is not restricted to any path. It merely exists so I can check in the code at different places if a user has this permission or not. Therefore, I have left the field "HTTP path" empty.
The result is that every user who has this permission, also has access to every other path - even things like /admin/auth/users or /admin/auth/roles!
It seems that an empty HTTP path always matches any given path.
This is at least a grave design error, if not a major security risk.
The text was updated successfully, but these errors were encountered: