0001-cookie-jar-bail-if-hostname-is-an-empty-string.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 3f5635028bbad44287511fcd3c99f2a2fddf01cd Mon Sep 17 00:00:00 2001
  2. From: Michael Catanzaro <mcatanzaro@igalia.com>
  3. Date: Sun, 24 Jun 2018 19:46:19 -0500
  4. Subject: [PATCH] cookie-jar: bail if hostname is an empty string
  5. There are several other ways to fix the problem with this function, but
  6. skipping over all of the code is probably the simplest.
  7. Fixes #3
  8. (cherry picked from commit db2b0d5809d5f8226d47312b40992cadbcde439f)
  9. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  10. ---
  11. Upstream status: commit db2b0d5809d
  12. libsoup/soup-cookie-jar.c | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
  15. index d12bc85a8e60..365da6abf9f4 100644
  16. --- a/libsoup/soup-cookie-jar.c
  17. +++ b/libsoup/soup-cookie-jar.c
  18. @@ -306,7 +306,7 @@ get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http, gboolean copy_
  19. priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar);
  20. - if (!uri->host)
  21. + if (!uri->host || !uri->host[0])
  22. return NULL;
  23. /* The logic here is a little weird, but the plan is that if
  24. --
  25. 2.18.0