ef7ce6e04d479590353139876d0fa409b861b259 galt Wed Jun 12 14:10:52 2013 -0700 removing unneeded fix-sqli functions diff --git src/hg/inc/jksql.h src/hg/inc/jksql.h index 1a2ed94..18a7559 100644 --- src/hg/inc/jksql.h +++ src/hg/inc/jksql.h @@ -547,55 +547,38 @@ /* dump internal info about SQL configuration for debugging purposes */ void sqlPrintStats(FILE *fh); /* print statistic about the number of connections and other options done by * this process. */ struct sqlResult *sqlStoreResult(struct sqlConnection *sc, char *query); /* Returns NULL if result was empty. Otherwise returns a structure * that you can do sqlRow() on. Same interface as sqlGetResult, * but internally this keeps the entire result in memory. */ /* --------- input checks to prevent sql injection --------------------------------------- */ -#define sqlCkQl sqlCheckQuotedLiteral -char *sqlCheckQuotedLiteral(char *s); -/* Check that none of the chars needing to be escaped are in the string s */ - -char *sqlCheckAlphaNum(char *word); -/* Check that only valid alpha numeric characters are used in word */ - -char *sqlEscapeIfNeeded(char *s, char **pS); -/* Escape if needed. if *pS is not null, free it. */ - #define sqlCkIl sqlCheckIdentifiersList char *sqlCheckIdentifiersList(char *identifiers); /* Check that only valid identifier characters are used in a comma-separated list */ #define sqlCkId sqlCheckIdentifier char *sqlCheckIdentifier(char *identifier); /* Check that only valid identifier characters are used */ -#define sqlCkTbl sqlCheckTableName -char *sqlCheckTableName(char *table); -/* check that only valid table name characters are used */ - -char *sqlCheckCgiEncodedName(char *name); -/* check that only valid cgi-encoded characters are used */ - // ============================= int vaSqlSafefNoAbort(char* buffer, int bufSize, boolean newString, char *format, va_list args); /* Format string to buffer, vsprintf style, only with buffer overflow * checking. The resulting string is always terminated with zero byte. * Scans string parameters for illegal sql chars. */ int vaSqlSafef(char* buffer, int bufSize, char *format, va_list args); /* Format string to buffer, vsprintf style, only with buffer overflow * checking. The resulting string is always terminated with zero byte. */ int sqlSafef(char* buffer, int bufSize, char *format, ...) /* Format string to buffer, vsprintf style, only with buffer overflow * checking. The resulting string is always terminated with zero byte. @@ -639,33 +622,30 @@ void sqlDyStringVaPrintfFrag(struct dyString *ds, char *format, va_list args); /* VarArgs Printf to end of dyString after scanning string parameters for illegal sql chars. NOSLQINJ tag is not added. */ void sqlDyStringPrintfFrag(struct dyString *ds, char *format, ...) /* Printf to end of dyString after scanning string parameters for illegal sql chars. NOSLQINJ tag is not added. */ #ifdef __GNUC__ __attribute__((format(printf, 2, 3))) #endif ; void sqlDyStringAppend(struct dyString *ds, char *string); /* Append zero terminated string to end of dyString. * Make sure the NOSQLINJ prefix gets added if needed */ -char *sqlDyStringFrag(struct dyString *ds); -/* If ds is only a sql fragment, do not need leading NOSQLINJ tag */ - struct dyString *sqlDyStringCreate(char *format, ...) /* Create a dyString with a printf style initial content * Make sure the NOSQLINJ prefix gets added if needed */ #ifdef __GNUC__ __attribute__((format(printf, 1, 2))) #endif ; void sqlCheckError(char *format, ...) /* A sql injection error has occurred. Check for settings and respond * as appropriate with error, warning, ignore, dumpstack. * Then abort if needed. NOTE: unless it aborts, this function will return! */ #ifdef __GNUC__ __attribute__((format(printf, 1, 2))) #endif