Don't include potentially sensitive window titles in logs

For various error and warning messages, mutter includes a description of
the window, and that description includes a snippet of the title of the
window. Those snippets find their way into system logs, which then means
they can potentially find their way into bug reports and similar. Remove
the window title information to eliminate this potential privacy issue.
This commit is contained in:
Josh Triplett 2018-08-09 17:16:02 -07:00
parent 317414ab26
commit b4ae6cdd62

View File

@ -914,29 +914,15 @@ meta_window_update_sandboxed_app_id (MetaWindow *window)
static void
meta_window_update_desc (MetaWindow *window)
{
g_autofree gchar *title = NULL;
g_clear_pointer (&window->desc, g_free);
if (window->title)
title = g_utf8_substring (window->title, 0,
MIN (10, g_utf8_strlen (window->title, -1)));
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
{
if (title)
window->desc = g_strdup_printf ("0x%lx (%s)", window->xwindow, title);
else
window->desc = g_strdup_printf ("0x%lx", window->xwindow);
}
window->desc = g_strdup_printf ("0x%lx", window->xwindow);
else
{
guint64 small_stamp = window->stamp - G_GUINT64_CONSTANT(0x100000000);
if (title)
window->desc = g_strdup_printf ("W%" G_GUINT64_FORMAT " (%s)", small_stamp, title);
else
window->desc = g_strdup_printf ("W%" G_GUINT64_FORMAT , small_stamp);
window->desc = g_strdup_printf ("W%" G_GUINT64_FORMAT , small_stamp);
}
}