080a160c7b9595d516c9c70e83689a09b60839d0 galt Mon Jun 3 12:16:53 2013 -0700 fix SQL Injection diff --git src/hg/hgc/txCdsInfo.c src/hg/hgc/txCdsInfo.c index 0e57c03..2166bc8 100644 --- src/hg/hgc/txCdsInfo.c +++ src/hg/hgc/txCdsInfo.c @@ -5,31 +5,31 @@ #include "hdb.h" #include "web.h" #include "cdsEvidence.h" #include "txInfo.h" #include "trackDb.h" #include "hgc.h" void showTxInfo(char *geneName, struct trackDb *tdb, char *txInfoTable) /* Print out stuff from txInfo table. */ { struct sqlConnection *conn = hAllocConn(database); if (sqlTableExists(conn, txInfoTable)) { char query[512]; - safef(query, sizeof(query), "select * from %s where name='%s'", txInfoTable, geneName); + sqlSafef(query, sizeof(query), "select * from %s where name='%s'", txInfoTable, geneName); struct sqlResult *sr = sqlGetResult(conn, query); char **row; if ((row = sqlNextRow(sr)) != NULL) { struct txInfo *info = txInfoLoad(row); webNewSection("Transcript Information"); webPrintLinkTableStart(); webPrintLinkCell("category:"); webPrintLinkCell(info->category); webPrintLinkCell("nonsense-mediated-decay:"); webPrintLinkCell(info->nonsenseMediatedDecay ? "yes" : "no"); webPrintLinkCell("RNA accession:"); webPrintLinkCell(info->sourceAcc); webPrintLinkTableNewRow(); @@ -189,35 +189,35 @@ "