diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f7ed40d4..19fa91996 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Improve performance of GET_REPORTS [#801](https://github.com/greenbone/gvmd/pull/801) [#811](https://github.com/greenbone/gvmd/pull/811) [#817](https://github.com/greenbone/gvmd/pull/817) - Speed up the HELP 'brief' case [#807](https://github.com/greenbone/gvmd/pull/807) - Faster startup [#826](https://github.com/greenbone/gvmd/pull/826) +- Refuse to import config with missing NVT preference ID [#853](https://github.com/greenbone/gvmd/pull/853) ### Changed - Update SCAP and CERT feed info in sync scripts [#810](https://github.com/greenbone/gvmd/pull/810) diff --git a/src/manage_sql_configs.c b/src/manage_sql_configs.c index 7457bb7d9..ab4074e53 100644 --- a/src/manage_sql_configs.c +++ b/src/manage_sql_configs.c @@ -2069,6 +2069,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 0e6995524..77d319810 100644 --- a/src/schema_formats/XML/GMP.xml.in +++ b/src/schema_formats/XML/GMP.xml.in @@ -27219,6 +27219,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20.04 + + 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
+ Importing of old scan configs that do not specify an ID for their + NVT preferences is no longer allowed. +