Closed scyto closed 3 years ago
also does this mean the login.php file redundant or would it need the same test too?
also does this mean the login.php file redundant or would it need the same test too?
The login.php file processes the input coming from the login form so it needs to load the config/users.php
for the actual authentication. The inclusion of the file in index.php
is only needed to determine whether we need to enable the user login form or not.
you included this, so closing as fixed.
I added this test to index.php to cope with condition when config/users.php exists but where $users in config/users.php is not defined.
It bypasses auth to match the text in config/users.php that says thats what is supposed to happen.
This is designed to solve the issue i raised in https://github.com/Art-of-WiFi/UniFi-API-browser/issues/84.
I am not a coder, this is my first ever real code PR so please go gentle on me if my code is crap.
This can be easily tested by pulling scyto/unifibrowser:noauth - and adding a new variable when running the container called NOAPIBROWSERAUTH - setting to 1 bypasses auth and setting it to 0 keeps auth.