GNOME Bugzilla – Bug 770260
privacy: Unquote distro name in Problem Reporting
Last modified: 2016-08-30 11:02:47 UTC
According to the /etc/os-release specification, the NAME value must be enclosed in quotation marks if it contains more than one word (such as Red Hat Enterprise Linux or Debian GNU/Linux). If it contains only one word, apparently quotations are optional. Although Fedora uses NAME=Fedora, Ubuntu uses NAME="Ubuntu" (although if you use Fedora, note that /etc/os-release encases "Fedora" in quotation marks for other fields.) As currently implemented in gnome-control-center 3.20.1, a distro that uses quotes will get this message in the Problem Reporting dialog in the Privacy panel (assuming Problem Reporting is enabled). == Sending reports of technical problems helps us improve "Ubuntu". Reports are sent anonymously and are scrubbed of personal data. == The quotation marks (single or double) should be removed first. Screenshot and patch attached. I'd like to commit this to the 3.18 and 3.20 branches too.
Created attachment 333955 [details] [review] privacy: Unquote distro name in Problem Reporting
Created attachment 333956 [details] Screenshot
Created attachment 333957 [details] [review] privacy: Unquote distro name in Problem Reporting Correct the previous patch by moving g_shell_unquote above the fallback to GNOME in case g_shell_unquote fails (and sets name to NULL).
https://www.freedesktop.org/software/systemd/man/os-release.html
Created attachment 334328 [details] [review] privacy: Unquote distro name & privacy policy url in Problem Reporting I found a similar problem with the privacy policy url being broken if it's in quotes (like Ubuntu's is) so here's an updated patch for it.
Review of attachment 334328 [details] [review]: ::: panels/privacy/cc-privacy-panel.c @@ +105,3 @@ } + name = g_shell_unquote (name, NULL); 1) This very likely breaks when name is NULL 2) it leaks the original "name" variable @@ +140,3 @@ } + name = g_shell_unquote (name, NULL); Ditto here.
Created attachment 334356 [details] [review] 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").
Attachment 334356 [details] pushed as 3986413 - privacy: Fix quoting of distro name and privacy URL
Pushed to gnome-3-20 branch as well.