[libsoup] soup-tld: Handle SOUP_TLD_ERROR_NO_BASE_DOMAIN in soup_tld_domain_is_public_suffix()



commit 549521112dec1821584258e68d1224b98f8e52c8
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Tue Jul 17 12:54:07 2012 +0200

    soup-tld: Handle SOUP_TLD_ERROR_NO_BASE_DOMAIN in soup_tld_domain_is_public_suffix()
    
    And return FALSE in case domain doesn't have a base domain, so that non
    suffixed domains like localhost are not considered public.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679230

 libsoup/soup-tld.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/soup-tld.c b/libsoup/soup-tld.c
index 73654b0..0c40b67 100644
--- a/libsoup/soup-tld.c
+++ b/libsoup/soup-tld.c
@@ -109,6 +109,11 @@ soup_tld_domain_is_public_suffix (const char *domain)
 	if (base_domain)
 		return FALSE;
 
+	if (g_error_matches (error, SOUP_TLD_ERROR, SOUP_TLD_ERROR_NO_BASE_DOMAIN)) {
+		g_error_free (error);
+		return FALSE;
+	}
+
 	if (g_error_matches (error, SOUP_TLD_ERROR, SOUP_TLD_ERROR_IS_IP_ADDRESS) ||
 	    g_error_matches (error, SOUP_TLD_ERROR, SOUP_TLD_ERROR_INVALID_HOSTNAME)) {
 		g_error_free (error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]