Commit b4ae6cdd authored by Josh Triplett's avatar Josh Triplett

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.
parent 317414ab
Pipeline #55706 passed with stages
in 5 minutes and 14 seconds
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment