From 0c5b98b46459a0d4ada4b2c2f9d369a8d3333f3c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 23 Mar 2016 16:12:12 +0100 Subject: [PATCH] core: be strict when parsing connection in AddAndActivateConnection AddAndActivateConnection is allowed to provide an incomplete connection that will be completed by NetworkManager. That is, a connection that does not verify. But we still want to catch invalid properties or unknown setting types. Thus, we want to reject invalid partial connections. This possibly rejects invalid requests from clients that were accepted before. Thus this change has the potential to break misbehaving clients. --- src/nm-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index 06065536f..ba52d52f7 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -3599,7 +3599,7 @@ impl_manager_add_and_activate_connection (NMManager *self, */ connection = nm_simple_connection_new (); if (settings && g_variant_n_children (settings)) - nm_connection_replace_settings (connection, settings, NULL); + _nm_connection_replace_settings (connection, settings, NM_SETTING_PARSE_FLAGS_STRICT, NULL); subject = validate_activation_request (self, context, -- 2.17.1