ido: Escape application version.

This commit is contained in:
Gunnar Beutner 2013-10-14 09:46:44 +02:00
parent b695f08081
commit 8894a77a19
1 changed files with 1 additions and 1 deletions

View 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 */