mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
fixed security bug when ldap is enabled, the api was still accessible without auth
This commit is contained in:
parent
8db301b87d
commit
e5afab8429
@ -26,6 +26,13 @@ class Api extends Main
|
||||
{
|
||||
die("The API has been disabled\n");
|
||||
}
|
||||
|
||||
// if ldap is configured and no api token is configured, fail the request
|
||||
if ((config_item('require_auth') == true) && (config_item('apikey') == ''))
|
||||
{
|
||||
die("API key not configured");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function index()
|
||||
|
Loading…
x
Reference in New Issue
Block a user