20b4963890eb5cad3358d52552a23a8eb3d4843e
galt
  Wed Jun 26 14:23:18 2013 -0700
making the output a little safer for ignore situations so logs will not fill up with messages no one cares about
diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c
index d8da0a2..db359fa 100644
--- src/hg/lib/jksql.c
+++ src/hg/lib/jksql.c
@@ -2772,40 +2772,47 @@
 
 static boolean sqlCheckAllowedChars(char *s, char disAllowed[256])
 /* Check each character of input against allowed character set */
 {
 if (!s)
     {
     sqlCheckError("sqlCheckAllowedChars - Cannot check NULL");
     return FALSE;
     }
 char *sOriginal = s;
 unsigned char c;
 while((c = *s++) != 0)
     {
     if (disAllowed[c])
 	{
-	fprintf(stderr, "character %c disallowed in sql string part %s\n", c, sOriginal);  // DEBUG REMOVE GALT 
-
 	// DEBUG REMOVE Temporary for trying to track down some weird error 
 	//  because the stackdump should appear but does not.
 	//dumpStack("character %c disallowed in sql string part %s\n", c, sOriginal);  // DEBUG REMOVE GALT 
 
 	// TODO for some reason the warn stack is messed up sometimes very eary. -- happening in hgTables position search on brca
 	//warn("character %c disallowed in sql string part %s", c, sOriginal);
 
-	return FALSE;  // might want to look at hg.conf settings and if debugging, show details.
+	// DEBUG REMOVE GALT 
+	// just using this as a work-around
+	// until the problem with early errors and warn/abort stacks has been fixed.
+	char *noSqlInjLevel = cfgOption("noSqlInj.level");
+	if (noSqlInjLevel && !sameString(noSqlInjLevel, "ignore"))
+	    {
+    	    fprintf(stderr, "character %c disallowed in sql string part %s\n", c, sOriginal);  
+	    }
+
+	return FALSE;
 	}
     }
 return TRUE;
 }
 
 static void sqlCheckDisallowAllChars(char disAllowed[256])
 /* Disallow all chars by setting to 1 */
 {
 int i;
 for(i=0;i<256;++i)
     disAllowed[i] = 1;
 }
 
 static void sqlCheckAllowLowerChars(char allowed[256])
 /* Allow lower case chars by setting to 0 */