diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -123,12 +123,18 @@ stp_validate_fetch_token_from_query (GHashTable *tokens, /* Only needed for RTP streaming */ udp_clients = g_hash_table_lookup (query, "udp-clients"); - if (!udp_clients) { + token->udp_clients = g_strdup (udp_clients); + + if (!token->udp_clients) { *http_status_code = SOUP_STATUS_BAD_REQUEST; goto err; } - token->udp_clients = g_strdup (udp_clients); + if (!stp_clients_is_subset (perms_token->udp_clients, + token->udp_clients)) { + *http_status_code = SOUP_STATUS_FORBIDDEN; + goto err; + } out: g_hash_table_destroy (query); |