diff options
author | Thomas Haller <thaller@redhat.com> | 2015-07-16 16:58:14 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-07-16 17:11:04 +0200 |
commit | 1e102bccdd8dd0b65b19bb9329ccaa9457ae2133 (patch) | |
tree | fefca9f8804d2170b2b16c2a796cc596a81d9ee4 | |
parent | 171b54b11c3ab8cc8353deb12b8a9eaf9d4434f2 (diff) | |
download | NetworkManager-1e102bccdd8dd0b65b19bb9329ccaa9457ae2133.tar.gz |
connectivity: log warning when using https:// URI
https://bugzilla.gnome.org/show_bug.cgi?id=747866
(cherry picked from commit eab32a5252e82361a563154cd8bfc3949aaad119)
-rw-r--r-- | src/nm-connectivity.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c index cb1423dbad..d3f9f25e75 100644 --- a/src/nm-connectivity.c +++ b/src/nm-connectivity.c @@ -371,12 +371,14 @@ set_property (GObject *object, guint property_id, NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self); const char *uri, *response; guint interval; + gboolean changed; switch (property_id) { case PROP_URI: uri = g_value_get_string (value); if (uri && !*uri) uri = NULL; + changed = g_strcmp0 (uri, priv->uri) != 0; #if WITH_CONCHECK if (uri) { SoupURI *soup_uri = soup_uri_new (uri); @@ -385,11 +387,14 @@ set_property (GObject *object, guint property_id, _LOGE ("invalid uri '%s' for connectivity check.", uri); uri = NULL; } + if (uri && soup_uri && changed && + soup_uri_get_scheme(soup_uri) == SOUP_URI_SCHEME_HTTPS) + _LOGW ("use of HTTPS for connectivity checking is not reliable and is discouraged (URI: %s)", uri); if (soup_uri) soup_uri_free (soup_uri); } #endif - if (g_strcmp0 (uri, priv->uri) != 0) { + if (changed) { g_free (priv->uri); priv->uri = g_strdup (uri); _reschedule_periodic_checks (self, TRUE); |