summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-31 09:08:55 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-31 09:08:55 (GMT)
commit12705920452bc2106be03e582bb9f6502f61944f (patch)
tree9abeab9b3360b9d05bcafa194d4f9871cccd8c28 /src/main.c
parentaa5a690bdfe957653f9b44e59e0390cd56e3bb09 (diff)
downloadsoup-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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index cbcff37..6ef0d37 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;