Blog

Blog Archives - 103 Record(s)

Remove Filter Year: '2008'

Trusted Source? DNS Cache Poisoning

Posted by Brad Wood
Aug 07, 2008 04:09:00 UTC
So, I assume you've heard the latest buzz about DNS Cache Poisoning and the subsequently released patches. It's rather interesting, and a bit unnerving that the "patch" for now simply makes the exploit harder to pull off-- not impossible. I guess that's basically because the patch simply makes name server requests more randomized. Anything more would require an overhaul to the DNS protocol itself.

Tower of Babel: Where did all the languages come from?

Posted by Brad Wood
Aug 03, 2008 08:34:00 UTC
In the beginning was assembly, and it was with the programmer and it was good. Through it all programs that have been made were written, without it no programs were written. The compiler shines in the darkness, but the darkness has not understood it. Then came a design pattern sent by Alan Kay, its name was OOP. The other day, someone asked me a really dumb question. "Why are there so many programming languages? Why don't you just all use one?" Ok, that was two questions, and they aren't really dumb, but I felt kinda' dumb trying to answer them.

Bitwise Operators: A Bit Wise

Posted by Brad Wood
Aug 02, 2008 08:25:00 UTC
Here's a couple functions you've probably rarely used in ColdFusion: bitand(), bitor(), bitnot(), bitxor() etc. Frankly I've rarely needed any of them, but this week I did find a clever use for bitand(). I was messing around with a simple database-driven calendar I put on my church's website because I promised them a reoccurring event feature. I needed a simple way to store 12 "monthly" checkboxes without using 12 columns in the database.

Operation cf_SQLProtect: 16,000 cfqueries protected

Posted by Brad Wood
Aug 01, 2008 06:25:00 UTC
I have confirmed at least 16,000 individual cfquery tags which have been protected from SQL injection vulnerabilities by having cfqueryparam added to them.

MySQL performance: INNER JOIN vs. sub-select

Posted by Brad Wood
Aug 01, 2008 04:51:00 UTC
I ran into an interesting behavior with MySQL this week. I was helping someone speed up a slow page and a sizable increase in performance was achieved by simply re-arranging the SQL statement. The page was calling a SQL statement inside of a loop-- probably around 150 times on a page load. My initial idea (and still the best long-term one I think) was to gather all the information from the database in a single cfquery and not hit the database over and over. That approach would have required quite a lot more refactoring of code, so first we tried to squeeze some better performance out of the SQL already being called.

ColdFusion Levenshtein Distance: String comparison and highlighting

Posted by Brad Wood
Jul 29, 2008 22:01:00 UTC
This is a fun project I put out there a while back. I recently went through and optimized the performance a bit so I could officially blog it. It is an implementation of the Levenshtein Distance Algorithm in CFScript that I based off of a C# version written by Siderite Zackwehdex. Finding the "distance" between two strings is a means of comparing two strings to see how similar they both are. This can be done by finding the Longest Common String or LCS. It is as much a brain bender as it can be occasionally useful.

cfqueryparam: it's not just for security-- also, when NOT to use it

Posted by Brad Wood
Jul 26, 2008 16:33:00 UTC
I generally don't care to write about topics that have already had the stuffing blogged out of them. However, I've still seen some of these questions floating around and I figure it never hurts to have more than one place on the 'net talking about it. The two things I wanted to cover real quick are how cfqueryparam may (or may not) enhance the performance of your queries. Also, when does criteria in a query NOT need a cfqueryparam.

Today is Operation cf_SQLprotect

Posted by Brad Wood
Jul 25, 2008 20:45:00 UTC
Today is the day. Unless you can bet money that every cfquery in your application is completely safe from SQL inject attacks you need to stop what you are doing and scan your sites. I have reviewed two cfqueryparam scanners to find vulnerable queries and one of them will even fix 95% of your code for you! If your boss asks what you are doing, tell him you found a security vulnerability being exploited and it needs to be closed. He'll understand.

JavaScript method of the day: scrollIntoView()

Posted by Brad Wood
Jul 25, 2008 09:48:00 UTC
This little guy isn't actually part of w3c spec, but it is supported by IE and Firefox and can be very handy. This method is inherited by any visible DOM element and when it is called will cause the page/frame/div to scroll until that element is in view.

Announcing the first ever International Operation cf_SQLprotect

Posted by Brad Wood
Jul 24, 2008 12:58:00 UTC
Hear Ye, Hear Ye! I hereby declare Friday, July 25th as the first ever International Operation cf_SQLprotect. In response to the massive amount of SQL injection attacks in the past few weeks I want the ColdFusion community to be doing our darndest to keep our applications safe from harm. This Friday, I want everyone who has a site big or small, well known or obscure, to join the world and scan their code base for vulnerable queries and fix them.

Site Updates

Entries Search