]> granicus.if.org Git - icinga2/commitdiff
ido: Escape application version.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 14 Oct 2013 07:46:44 +0000 (09:46 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 14 Oct 2013 07:46:44 +0000 (09:46 +0200)
components/db_ido_mysql/idomysqlconnection.cpp

index f38daccb4aec53c8cd8fc0e0103adc16d12d6af7..132e38342a82963123d236c41a607ec3790e2119 100644 (file)
@@ -157,7 +157,7 @@ void IdoMysqlConnection::ReconnectTimerHandler(void)
                /* record connection */
                Query("INSERT INTO " + GetTablePrefix() + "conninfo " +
                    "(instance_id, connect_time, last_checkin_time, agent_name, agent_version, connect_type, data_start_time) VALUES ("
-                   + Convert::ToString(static_cast<long>(m_InstanceID)) + ", NOW(), NOW(), 'icinga2 db_ido_mysql', " + Application::GetVersion()
+                   + Convert::ToString(static_cast<long>(m_InstanceID)) + ", NOW(), NOW(), 'icinga2 db_ido_mysql', " + Escape(Application::GetVersion())
                    + ", '" + (reconnect ? "RECONNECT" : "INITIAL") + "', NOW())");
 
                /* clear config tables for the initial config dump */