[libsoup/wip/tpopela/negotiate: 5/8] Trust all HTTPS URIs when SOUP_AUTH_TRUSTED_URIS environment variable is not set



commit d752d1fa2babbb8cc33214d6f40f4dd88659eb6e
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Oct 5 12:35:37 2015 +0200

    Trust all HTTPS URIs when SOUP_AUTH_TRUSTED_URIS environment variable is not set

 libsoup/soup-auth-negotiate.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-auth-negotiate.c b/libsoup/soup-auth-negotiate.c
index 11696b1..258af83 100644
--- a/libsoup/soup-auth-negotiate.c
+++ b/libsoup/soup-auth-negotiate.c
@@ -418,8 +418,9 @@ check_auth_trusted_uri (SoupAuthNegotiate *negotiate, SoupMessage *msg)
        g_return_val_if_fail (priv != NULL, FALSE);
        g_return_val_if_fail (msg != NULL, FALSE);
 
+       /* If no trusted uris are set, we allow all https uris */
        if (!trusted_uris) {
-               return FALSE;
+               return match_base_uri (msg, "https://";);
        }
 
        for (i = 0; i < g_strv_length (trusted_uris); i++) {


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