There is no excuse for clients to send connections to NetworkManager
that have invalid/unknown fields. Just reject them.
This is a dangerous change, because we might now reject connections
that we were accepting previously. Who know what clients were sending
and it used to work.
/* Check if the settings are valid first */
if (new_settings) {
tmp = _nm_simple_connection_new_from_dbus (new_settings,
/* Check if the settings are valid first */
if (new_settings) {
tmp = _nm_simple_connection_new_from_dbus (new_settings,
- NM_SETTING_PARSE_FLAGS_NORMALIZE,
+ NM_SETTING_PARSE_FLAGS_STRICT
+ | NM_SETTING_PARSE_FLAGS_NORMALIZE,
&error);
if (!tmp)
goto error;
&error);
if (!tmp)
goto error;
GError *error = NULL;
connection = _nm_simple_connection_new_from_dbus (settings,
GError *error = NULL;
connection = _nm_simple_connection_new_from_dbus (settings,
- NM_SETTING_PARSE_FLAGS_NORMALIZE,
+ NM_SETTING_PARSE_FLAGS_STRICT
+ | NM_SETTING_PARSE_FLAGS_NORMALIZE,
&error);
if (connection) {
&error);
if (connection) {