mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
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:
parent
317414ab26
commit
b4ae6cdd62
@ -914,28 +914,14 @@ 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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user