Author: timopollmeier
Date: 2017-11-02 16:08:50 +0100 (Thu, 02 Nov 2017)
New Revision: 29949

Modified:
   trunk/gvm/ChangeLog
   trunk/gvm/src/manage_sql.c
Log:
        * src/manage_sql.c (modify_override): Use sql_quote to quote nvt
        instead of sql_insert.

Modified: trunk/gvm/ChangeLog
===================================================================
--- trunk/gvm/ChangeLog 2017-11-02 14:34:41 UTC (rev 29948)
+++ trunk/gvm/ChangeLog 2017-11-02 15:08:50 UTC (rev 29949)
@@ -1,5 +1,10 @@
 2017-11-02  Timo Pollmeier <timo.pollme...@greenbone.net>
 
+       * src/manage_sql.c (modify_override): Use sql_quote to quote nvt
+       instead of sql_insert.
+
+2017-11-02  Timo Pollmeier <timo.pollme...@greenbone.net>
+
        * src/manage_sql.c (result_detection_reference): Quote the location
        string for SQL queries.
 

Modified: trunk/gvm/src/manage_sql.c
===================================================================
--- trunk/gvm/src/manage_sql.c  2017-11-02 14:34:41 UTC (rev 29948)
+++ trunk/gvm/src/manage_sql.c  2017-11-02 15:08:50 UTC (rev 29949)
@@ -44425,7 +44425,7 @@
   quoted_text = sql_insert (text);
   quoted_hosts = sql_insert (hosts);
   quoted_port = sql_insert (port);
-  quoted_nvt = sql_insert (nvt);
+  quoted_nvt = sql_quote (nvt);
 
   // Tests if a cache rebuild is necessary.
   //  The "active" status is checked separately
@@ -44502,9 +44502,9 @@
            quoted_hosts,
            quoted_port,
            quoted_severity,
-           nvt ? "nvt = " : "",
+           nvt ? "nvt = '" : "",
            nvt ? quoted_nvt : "",
-           nvt ? "," : "",
+           nvt ? "'," : "",
            new_severity_dbl,
            task,
            result,
@@ -44558,9 +44558,9 @@
            quoted_hosts,
            quoted_port,
            quoted_severity,
-           nvt ? "nvt = " : "",
+           nvt ? "nvt = '" : "",
            nvt ? quoted_nvt : "",
-           nvt ? "," : "",
+           nvt ? "'," : "",
            new_severity_dbl,
            task,
            result,

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits

Reply via email to