Index: includes/coder_security.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/coder/includes/coder_security.inc,v
retrieving revision 1.15.2.8
diff -u -p -r1.15.2.8 coder_security.inc
--- includes/coder_security.inc 12 May 2008 14:36:05 -0000 1.15.2.8
+++ includes/coder_security.inc 13 May 2008 11:41:18 -0000
@@ -36,7 +36,7 @@ function coder_security_reviews() {
     ),
     array(
       '#type' => 'regex',
-      '#value' => '^(select\s+.*\s+from\s+'. $table .'|insert\s+into\s+'. $table .'|update\s+'. $table .'\s+set|delete\s+from\s'. $table .')\s+.*\$',
+      '#value' => '^(select\s+.*\s+from\s+'. $table .'|insert\s+into\s+'. $table .'|update\s+'. $table .'\s+set|delete\s+from\s'. $table .')\s+.*\$[^\']',
       '#source' => 'doublequote',
       '#warning_callback' => '_coder_security_sql_var_warning',
     ),
Index: tests/coder_sql.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/coder/tests/Attic/coder_sql.inc,v
retrieving revision 1.1.4.6
diff -u -p -r1.1.4.6 coder_sql.inc
--- tests/coder_sql.inc 31 Jan 2008 20:19:27 -0000 1.1.4.6
+++ tests/coder_sql.inc 13 May 2008 11:41:18 -0000
@@ -22,4 +22,7 @@ function coder_test_sql() {
   $sql = 'INSERT INTO node (changed) VALUES (1)';
   $sql = 'SELECT * FROM {node} LIMIT 10';
   $sql = "SELECT * FROM {node} WHERE nid=$nid"; // unsecure
+  $sql = "SELECT COUNT(n.nid) FROM {node} n INNER JOIN {node_revisions} r USING (nid, vid) WHERE n.type='%s' AND (r.title REGEXP '^[^[:alpha:]].*$')";
+  $sql = "SELECT COUNT(n.nid) FROM {node} n INNER JOIN {node_revisions} r USING (nid, vid) WHERE n.type='%s' AND (r.title REGEXP '^[^[:alpha:]].*$') AND nid=$nid";
+  $sql = "SELECT COUNT(n.nid) FROM {node} n INNER JOIN {node_revisions} r USING (nid, vid) WHERE n.type=$type AND (r.title REGEXP '^[^[:alpha:]].*$')";
 }
