Closed (won't fix)
Project:
Node Comments
Version:
6.x-2.0-beta5
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2010 at 11:11 UTC
Updated:
23 Jun 2010 at 14:50 UTC
Hi,
a run the code throught coder..
maybe this should be fixed:
Line 1312: In SQL strings, Use db_query() placeholders in place of variables. This is a potential source of SQL injection attacks when the variable can come from user data. (Drupal Docs)
$query = "SELECT COUNT(*) FROM {node_comments} nc INNER JOIN {node} n ON n.nid = nc.cid WHERE $field $op $value AND n.status <> 0 AND n.nid != %d AND nc.nid = %d";
Comments
Comment #1
crea commentedThanks for the report. As one can see from the code, the variables are hardcoded (not user-provided), thus safe.