Calendar
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
Recent Entries No recent entries.
Recent Comments
Flex: Making Scrollbars Follow Focus
Daryl Banttari said: Still works fine for me. As I tab from field to field, the scrollbar adjusts to ensure the field wi...
[more]
Flex: Making Scrollbars Follow Focus
newchild said: your autoscroll class doesent scroll automaticly, even in your example. So what exactly is that for?...
[more]
Reviving the Lost Craft of Writing Specification Documents
Tanya said: Thank you:)
[more]
ColdFusion SQL Injection
Sam Singer said: Will this run on os x?
[more]
Reviving the Lost Craft of Writing Specification Documents
Nat Papovich said: Hi Greg, yes that was intentional. It's just an example, after all :)
Tanya, take a look at the Pow...
[more]
Archives By Subject
Business of Software (5) [RSS]
ColdFusion (321) [RSS]
Conferences (7) [RSS]
Databases (88) [RSS]
Flex & Flash (109) [RSS]
Fusebox (87) [RSS]
General Development (33) [RSS]
Google (9) [RSS]
Hardware (5) [RSS]
JVM & Java (132) [RSS]
Linux (20) [RSS]
Macintosh (1) [RSS]
Miscellaneous (254) [RSS]
Performance (8) [RSS]
SeeFusion (36) [RSS]
Shan's Simple Examples (7) [RSS]
User Interface (3) [RSS]
Windows (5) [RSS]
Archives By Poster
Daryl Banttari (11)
Nat Papovich (33)
Patrick Quinn (36)
Shannon Hicks (22)
Steve Nelson (22)
Tyson Vanek (3)
ColdFusion SQL Injection
Seems there's a lot of ColdFusion sites out there getting hit by an automated SQL Injection attack, which adds a "<script>" tag to varchar fields using a bit of SQL Server t-sql.
Many years ago, I wrote a script that would find and automatically <cfqueryparam> queries (which has been at Daryl's ColdFusion Primer. I've dug that up and updated it slightly to handle INSERT statements and not parameterize cached queries. (The latter will be highlighted in red.)
(For more information about avoiding SQL Injection in the first place, see my Paranoia 101 page at the aforementioned Primer.)
Place the script (temporarily) in your webroot and run it. It will show you all of the queries in that directory tree and give you checkboxes next to each that will allow you to choose which queries to parameterize. It will also show you what the result of parameterization will look like.
Remember-- it'll show you what it plans to do before it does anything. So you can run it once (and not click the "submit" button) simply to see what files contain unparameterized queries.
Caveats:
This will probably break some queries, especially if you do things like WHERE date > '#dateFormat(d)# #timeformat(d)#' or WHERE NAME LIKE '#searchname#%'. USE WITH CAUTION! It's best to test the changes before moving them into production. Remove the ".old" files once the site is confirmed as working well.


Anyway, other than that, this tool worked great!
Thanks.
WHERE name like '#form.name#%'
http://www.codersrevolution.com/index.cfm/2008/7/2...
If you successfully implement a change to get it to properly recognize the like systax let me know. I would like to clean up the interface a little bit. I don't know if Daryl has any time to assist with this. Perhaps he will chime in and let us know.
So, I changed my instances of:
findNoCase("<CFQUERY",TheFile)
to:
reFindNoCase("<CFQUERY\s",TheFile)
And that fixed all my problems.
But, any reason it uses the default "CF_SQL_CHAR"?
I'm using MSSQL and most of my 'text' fields are nvarchar. So am I correct that I need to set it to "CF_SQL_VARCHAR"? Is there any way to change this to be the defualt value? Thanks!
I've looked at the code and it seems that there is an error with the 'hash' part in the checkbox. It will repeat the same hash multiple times.
Has anyone else had this problem?