[gnome-control-center/gnome-3-20] privacy: Fix quoting of distro name and privacy URL



commit 2b911465c7f97ebdfe3e9e8a938cbb2c51a8f6be
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Aug 29 11:46:53 2016 +0200

    privacy: Fix quoting of distro name and privacy URL
    
    Unquote the distribution name and the privacy policy url in
    the Problem Reporting dialogue, as those can be shell-quoted (the format
    used by /etc/os-release is "shell-compatible").
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770260

 panels/privacy/cc-privacy-panel.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/panels/privacy/cc-privacy-panel.c b/panels/privacy/cc-privacy-panel.c
index a2f282d..89c1de8 100644
--- a/panels/privacy/cc-privacy-panel.c
+++ b/panels/privacy/cc-privacy-panel.c
@@ -104,6 +104,14 @@ get_os_name (void)
        g_free (buffer);
     }
 
+  if (name && *name != '\0')
+    {
+      char *tmp;
+      tmp = g_shell_unquote (name, NULL);
+      g_free (name);
+      name = tmp;
+    }
+
   if (name == NULL)
     name = g_strdup ("GNOME");
 
@@ -137,6 +145,14 @@ get_privacy_policy_url (void)
        g_free (buffer);
     }
 
+  if (name && *name != '\0')
+    {
+      char *tmp;
+      tmp = g_shell_unquote (name, NULL);
+      g_free (name);
+      name = tmp;
+    }
+
   if (name == NULL)
     name = g_strdup ("http://www.gnome.org/privacy-policy";);
 


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