[gnome-terminal] server: Be more strict about --app-id arguments



commit 2c85bd0f36c064ce30cebe542073c9c027d60aad
Author: Christian Persch <chpe src gnome org>
Date:   Mon Feb 5 21:20:28 2018 +0100

    server: Be more strict about --app-id arguments

 src/server.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/server.c b/src/server.c
index cce7581..829cf46 100644
--- a/src/server.c
+++ b/src/server.c
@@ -52,7 +52,8 @@ option_app_id_cb (const gchar *option_name,
                     gpointer     data,
                     GError     **error)
 {
-  if (!g_application_id_is_valid (value)) {
+  if (!g_application_id_is_valid (value) ||
+      !g_dbus_is_name (value)) {
     g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
                  "\"%s\" is not a valid application ID", value);
     return FALSE;


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