[mutter] Don't include potentially sensitive window titles in logs



commit b4ae6cdd622024e773ec33c13e31c2fb2cc14991
Author: Josh Triplett <josh joshtriplett org>
Date:   Thu Aug 9 17:16:02 2018 -0700

    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.

 src/core/window.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 0fac22b85..f99caaee5 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -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);
     }
 }
 


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