Blame SOURCES/0104-rhtsupport-never-use-uReport-URL-from-ureport.config.patch

562801
From 218ae6bbc9ecd1538bfde2c8033cd1ff82a53bbe Mon Sep 17 00:00:00 2001
562801
From: Jakub Filak <jfilak@redhat.com>
562801
Date: Wed, 22 Oct 2014 10:21:07 +0200
562801
Subject: [LIBREPORT PATCH 104/105] rhtsupport: never use uReport URL from
562801
 ureport.config
562801
562801
The GUI reporter always export uReport_URL, thus reporter-rhtsupport
562801
never use the Strata URL.
562801
562801
Moreover, usage of uReport_URL is really bad idea, because a reporter
562801
thinks he is going to send data to the portal but the ureport might end
562801
somewhere else.
562801
562801
Related #1139987
562801
562801
Signed-off-by: Jakub Filak <jfilak@redhat.com>
562801
---
562801
 src/plugins/reporter-rhtsupport.c | 24 ++++++++++++------------
562801
 1 file changed, 12 insertions(+), 12 deletions(-)
562801
562801
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
562801
index e1c73d0..4b74c5c 100644
562801
--- a/src/plugins/reporter-rhtsupport.c
562801
+++ b/src/plugins/reporter-rhtsupport.c
562801
@@ -383,18 +383,18 @@ void prepare_ureport_configuration(const char *urcfile,
562801
     load_conf_file(urcfile, settings, false);
562801
     ureport_server_config_init(urconf);
562801
 
562801
-    char *url = NULL;
562801
-    UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
562801
-    if (url == NULL)
562801
-    {
562801
-        ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
562801
-        urconf->ur_ssl_verify = ssl_verify;
562801
-    }
562801
-    else
562801
-    {
562801
-        UREPORT_OPTION_VALUE_FROM_CONF(settings, "SSLVerify", urconf->ur_ssl_verify, string_to_bool);
562801
-        ureport_server_config_set_url(urconf, url);
562801
-    }
562801
+    /* The following lines cause that we always use URL from ureport's
562801
+     * configuration becuase the GUI reporter always exports uReport_URL env
562801
+     * var.
562801
+     *
562801
+     *   char *url = NULL;
562801
+     *   UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
562801
+     *   if (url != NULL)
562801
+     *       ureport_server_config_set_url(urconf, url);
562801
+     */
562801
+
562801
+    ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
562801
+    urconf->ur_ssl_verify = ssl_verify;
562801
 
562801
     ureport_server_config_set_basic_auth(urconf, login, password);
562801
 
562801
-- 
562801
1.8.3.1
562801