Sql Injection Ad Naseaum
A while ago Scott had a great post about demo code . So I was reading up on The Bleeding Edge, Never Been Done Before Technology Known As Ajax and started surfing around a little b/c I wanted to get in on the mocumentary action. So I come across Peter's where he warns you not to believe the hype. Peter's got some examples on how to use it and then some d1ckhead points out that his code is vulnerable to Injection Attacks.
This was like a total slashdot comment... Why? Well, it's some really stupid unclever point that has nothing to do with the subject matter at hand. I hate dynamic unparamaterized SQL as anyone, hell I started the club, but this code wasn't about Injection attacks and it was for demo puproses only. Hmm, if we're going to nitpick abotu demo code, then there's a lot more to bitch about. But I personally don't really want to start reading code blocks that comprise 10 lines of actual code but have three try/catch blocks in them which span only one line of code each. This is after all, how we code in production but do we really want to see surgically precise exception handling in demo code? Probably not.
This type of sh1t really actually pisses me off. A while ago, I was at a major conference back when the Compact Framework and the MMIT had just come out. This guy was demoing the IBuySpy stuff on the compact framework w/ Sql Server CE. There were about 300 people in the audience and he starts taking questions. So some d1ckhead says “I think it's totally irresponsible for you, as an expert in the field, to display code that's PARADING security flaws in front of developers who aren't experienced with this technology. Your code is using dynamic sql and is open to an injection attack, and people here will look at your coding style and copy it. So one oversight like this on your part could cause several security problems..”
IT WAS DEMO CODE ON SQL SERVER CE. Hmmm, i have full control of the device and it's a demo anyway and I'm going to use a f~cking injection attack to destroy the db. Boy, that's a 3:33t H4ck for you. And this was probably the samef~cktard that was dissing Peter's example. Everyone knows about injection attacks ok. You don't need to point it out every time someone does a f!cking demo already. Sure, if someone's using it at work, have at it. But for demos, it's acceptable - and TRUST ME, you *DON'T* look smart or security conscious by pointing crap like this out when someone's trying to demo some new stuff for you. It just distracts them and wastes everyone elses time.