summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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;