Hey Ki,
I ran the coder module and came across the following critical SQL issues:
report_content.module:
Line 87, Line 90, and Line 137: the %s placeholder needs to be wrapped in single quotes to avoid SQL injection.
report_user.module:
Line 104 and Line 116: need curly brackets around the table names.
Line 420: use placeholders instead of variables in a query.
I also found some normal status SQL issues:
report.module
Line 101: Use db_query_range() instead of the SQL LIMIT clause
report_content.module
Line 87, Line 90, Line 137: Use db_query_range() instead of the SQL LIMIT clause
There were also a series of other Drupal coding issues that I came across. I've attached a patch with fixes for all of these issues.
-German
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | report-[843234].patch | 94.4 KB | gclicon |
Comments
Comment #1
gclicon commentedWhoops!
forgot to attach the patch file.
Here you go.
Comment #2
ki commentedThanks for the clean up work, German.
Some of the suggestions were modified because putting quotes around %s would break the code in this case.
Ki