1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

Fix: SECURITY Do not handle admin-requests in listen-socket auth differently.

This also adds comments to _handle_authentication_global() and
_handle_authentication_mount_default() to explain the situation.
This commit is contained in:
Philipp Schafft 2018-10-04 09:00:26 +00:00
parent 09ade15b91
commit f20dfcef63

View File

@ -1347,6 +1347,7 @@ static void _handle_authentication_global(client_t *client, void *userdata, auth
client->authstack = NULL;
if (result != AUTH_NOMATCH &&
/* Allow global admins access to all mount points */
!(result == AUTH_OK && client->admin_command != ADMIN_COMMAND_ERROR && acl_test_admin(client->acl, client->admin_command) == ACL_POLICY_DENY)) {
_handle_authed_client(client, userdata, result);
return;
@ -1404,6 +1405,7 @@ static void _handle_authentication_mount_default(client_t *client, void *userdat
client->authstack = NULL;
if (result != AUTH_NOMATCH &&
/* Allow global admins access to all mount points */
!(result == AUTH_OK && client->admin_command != ADMIN_COMMAND_ERROR && acl_test_admin(client->acl, client->admin_command) == ACL_POLICY_DENY)) {
_handle_authed_client(client, userdata, result);
return;
@ -1418,8 +1420,7 @@ static void _handle_authentication_mount_normal(client_t *client, void *userdata
auth_stack_release(client->authstack);
client->authstack = NULL;
if (result != AUTH_NOMATCH &&
!(result == AUTH_OK && client->admin_command != ADMIN_COMMAND_ERROR && acl_test_admin(client->acl, client->admin_command) == ACL_POLICY_DENY)) {
if (result != AUTH_NOMATCH) {
_handle_authed_client(client, userdata, result);
return;
}