diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -112,7 +112,7 @@ stp_validate_fetch_token_from_query (GHashTable *tokens, token->stream_type = stp_get_stream_type_from_string (type); perms_token = g_hash_table_lookup (tokens, sessionid); - if (stp_inet_addrmask && + if (stp_inet_addrmask && perms_token && perms_token->stream_type != token->stream_type) { *http_status_code = SOUP_STATUS_FORBIDDEN; goto err; @@ -130,7 +130,8 @@ stp_validate_fetch_token_from_query (GHashTable *tokens, goto err; } - if (!stp_clients_is_subset (perms_token->udp_clients, + if (perms_token && + !stp_clients_is_subset (perms_token->udp_clients, token->udp_clients)) { *http_status_code = SOUP_STATUS_FORBIDDEN; goto err; |