Line 212: In SQL strings, Use db_query() placeholders in place of variables. This is a protential source of SQL injection attacks when the variable can come from user data. (Drupal Docs)
$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:]].*$')";
BTW, there is a typo in "protential".
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | coder_6x_257499.patch | 1.92 KB | stella |
Comments
Comment #1
stella commentedI've fixed the typo in CVS, will try and look at the false positive issue later.
Cheers,
Stella
Comment #2
stella commentedTry the attached patch. It assumes that any $ signs followed by a single quote are ok. The patch is for the 6.x version, but should apply to the 5.x version too.
Cheers,
Stella
Comment #3
nancydruOkay, that took care of my problem. IMO, this is RTBC.
Comment #4
stella commentedCommitted, thanks.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.