Closed (fixed)
Project:
Station
Version:
6.x-2.x-dev
Component:
Other
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2009 at 06:28 UTC
Updated:
5 Oct 2009 at 17:00 UTC
I ran the Coder module on Station and fixed a bunch of inconsistencies, see the attached patch.
Used grep+sed for changes, and nothing seems broken, so it should be safe.
In addition, the following files are missing CVS tags:
station/archive/scripts/ripper.inc
station/archive/scripts/ripper.phpstation/archive/station_archive.admin.inc
station/archive/station_archive.legacy_pages.inc
station/catalog/station_catalog.pages.inc
station/archive/scripts/ripper.inc
station/archive/scripts/ripper.phpstation/archive/station_archive.admin.inc
station/archive/station_archive.legacy_pages.inc
station/catalog/station_catalog.pages.inc
station/playlist/station_playlist.moduleAlso, it gives the following complaints:
station/catalog/station_catalog.pages.inc
Line 42: 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.
$result = pager_query(db_rewrite_sql("SELECT n.nid, sc.* FROM {node} n INNER JOIN {station_catalog} sc ON n.nid = sc.nid WHERE LOWER(sc.$field) LIKE LOWER('%%%s%%')") . tablesort_sql($header), $perpage, 0, NULL, $value);station/playlist/station_playlist.module
Line 94: 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.
$result = db_query(db_rewrite_sql("SELECT COUNT(n.nid) FROM {node} n INNER JOIN {{$db_info['table']}} sp ON n.nid = sp.$col WHERE sp.$col = %d AND n.status = 1"), $object->nid);Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| station.patch | 48.89 KB | tim.plunkett |
Comments
Comment #1
drewish commentedNoticed the change to station_playlist_nodeapi():
I'm not sure this is correct... or at least that it might be using the wrong quoting mechanism. Doesn't mysql have one for data values and one for fieldnames?
Went ahead committed everything but station_playlist.module and the *.views_defaults.inc changes. The views defaults are generated as exports from views and I want to have to do a bunch of manual editing after exporting to avoid huge diffs.
If you want to look at the remainder and re-roll I'd love to see it.
Comment #2
drewish commentedI think that SQL issue was basically the same one you'd identified elsewhere in the module. I'm not sure what the best fix is but we need to document that we're doing wacky stuff.
Comment #3
drewish commentedI'm trying to clean things up in the queue and this is basically finished.