You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The order of logic used in EnvironmentChecker::init() means that if the BasicAuth environment variables are set then that is the only authentication that is checked when accessing /dev/check and therefore admin users who should have access to the page can't view it unless they also know the Basic Auth username/password.
Expected behaviour: Logged in users with sufficient permissions should be able to see the /dev/check page without triggering Basic Auth regardless whether the Basic Auth option is turned on or not.
How to reproduce
install the module
Add the 'ENVCHECK_BASICAUTH_USERNAME' and 'ENVCHECK_BASICAUTH_PASSWORD' environment variables as per documentation
Log in as an admin user via the normal /Security/login system
Go to /dev/check - this will trigger the Basic Auth authentication which only works with the environment variable username/password and not with actual user information.
Possible Solution
Change the order in which the permission checks are happening. Instead of current order
Module version(s) affected
3.0.2
Description
The order of logic used in
EnvironmentChecker::init()
means that if the BasicAuth environment variables are set then that is the only authentication that is checked when accessing /dev/check and therefore admin users who should have access to the page can't view it unless they also know the Basic Auth username/password.Expected behaviour: Logged in users with sufficient permissions should be able to see the /dev/check page without triggering Basic Auth regardless whether the Basic Auth option is turned on or not.
How to reproduce
/Security/login
system/dev/check
- this will trigger the Basic Auth authentication which only works with the environment variable username/password and not with actual user information.Possible Solution
Change the order in which the permission checks are happening. Instead of current order
check first that the current user does not have access to the page with e.g.
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)PRs
The text was updated successfully, but these errors were encountered: