2021-04-20 Fred Gleason <fredg@paravelsystems.com>

* Escaped all SQL identifiers in 'ripcd/'.
	* Replaced " with ' delimiters in all SQL literal strings in
	'ripcd/'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-04-20 09:20:54 -04:00
parent efd3920bb5
commit 65b6c9e671
14 changed files with 279 additions and 298 deletions

View File

@@ -145,13 +145,13 @@ LiveWireMcastGpio::LiveWireMcastGpio(RDMatrix *matrix,QObject *parent)
// Source Table
//
sql=QString("select ")+
"SLOT,"+ // 00
"SOURCE_NUMBER,"+ // 01
"IP_ADDRESS "+ // 02
"`SLOT`,"+ // 00
"`SOURCE_NUMBER`,"+ // 01
"`IP_ADDRESS` "+ // 02
"from LIVEWIRE_GPIO_SLOTS "+
"where (STATION_NAME=\""+RDEscapeString(livewire_stationname)+"\")&&"+
QString().sprintf("(MATRIX=%d) ",livewire_matrix)+
"order by SLOT";
"where (`STATION_NAME`='"+RDEscapeString(livewire_stationname)+"')&&"+
QString().sprintf("(`MATRIX`=%d) ",livewire_matrix)+
"order by `SLOT`";
q=new RDSqlQuery(sql);
while(q->next()) {
if(q->value(0).toInt()<((int)livewire_gpios/RD_LIVEWIRE_GPIO_BUNDLE_SIZE)) {