summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2018-06-24 19:46:19 -0500
committerMichael Catanzaro <mcatanzaro@posteo.net>2018-06-28 11:39:45 +0000
commitdb2b0d5809d5f8226d47312b40992cadbcde439f (patch)
treeeaf2c534be09f3ff7c7f7e9f972f46a9ff8ab646
parent171a461f81077841baabf527ec6cfd1633703113 (diff)
downloadlibsoup-db2b0d5809d5f8226d47312b40992cadbcde439f.tar.gz
cookie-jar: bail if hostname is an empty string
There are several other ways to fix the problem with this function, but skipping over all of the code is probably the simplest. Fixes #3
-rw-r--r--libsoup/soup-cookie-jar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
index 2369c8a7..b2b78909 100644
--- a/libsoup/soup-cookie-jar.c
+++ b/libsoup/soup-cookie-jar.c
@@ -307,7 +307,7 @@ get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http, gboolean copy_
priv = soup_cookie_jar_get_instance_private (jar);
- if (!uri->host)
+ if (!uri->host || !uri->host[0])
return NULL;
/* The logic here is a little weird, but the plan is that if