diff --git a/CHANGELOG.md b/CHANGELOG.md index 56b5d11eb..ae11a49c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Add option --optimize migrate-relay-sensors [#827](https://github.com/greenbone/gvmd/pull/827) - Add host_id filter for tls_certificates [#835](https://github.com/greenbone/gvmd/pull/835) - Allow use of public key auth in SCP alert [#845](https://github.com/greenbone/gvmd/pull/845) +- Refuse to import config with missing NVT preference ID [#856](https://github.com/greenbone/gvmd/pull/856) ### Changed - Extend command line options for managing scanners [#815](https://github.com/greenbone/gvmd/pull/815) diff --git a/src/manage_sql_configs.c b/src/manage_sql_configs.c index 935c96d6d..5179fe81b 100644 --- a/src/manage_sql_configs.c +++ b/src/manage_sql_configs.c @@ -2178,6 +2178,10 @@ config_insert_preferences (config_t config, if (config_type == NULL || strcmp (config_type, "0") == 0) { /* NVT preference */ + + if (preference->id == NULL || *preference->id == '\0') + return -4; + /* OID:PrefID:PrefType:PrefName value */ sql ("INSERT INTO config_preferences" " (config, type, name, value)" diff --git a/src/schema_formats/XML/GMP.xml.in b/src/schema_formats/XML/GMP.xml.in index e21a8c010..3acd9789e 100644 --- a/src/schema_formats/XML/GMP.xml.in +++ b/src/schema_formats/XML/GMP.xml.in @@ -27257,6 +27257,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + + CREATE_CONFIG + NVT preferences without IDs are no longer accepted + +

+ Importing of old scan configs that do not specify an ID for their + NVT preferences is no longer allowed. +

+
+ 9.0 +
GET_REPORTS Default of "details" attribute is now 0