diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-31 09:08:55 (GMT) |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-31 09:08:55 (GMT) |
commit | 12705920452bc2106be03e582bb9f6502f61944f (patch) | |
tree | 9abeab9b3360b9d05bcafa194d4f9871cccd8c28 /src/main.c | |
parent | aa5a690bdfe957653f9b44e59e0390cd56e3bb09 (diff) | |
download | soup-transcoding-proxy-12705920452bc2106be03e582bb9f6502f61944f.zip soup-transcoding-proxy-12705920452bc2106be03e582bb9f6502f61944f.tar.gz |
token validation: Fix udp client fetching when not using token validation
Diffstat (limited to 'src/main.c')
-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; |