Click here to Skip to main content
15,906,816 members

Survey Results

Do you have plans to use the Entity Framework?   [Edit]

Survey period: 10 Nov 2008 to 17 Nov 2008

Having impedance mismatch problems? The Entity Framework could be the solution. Or maybe not. (Suggested by IdeaBlade)

OptionVotes% 
We already use it474.47
Definitely797.52
Maybe27325.98
Probably not17416.56
Definitely not706.66
I don't know what it is35633.87
It's not applicable to my work524.95



 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon14-Nov-08 8:23
professionalJeremy Falcon14-Nov-08 8:23 
GeneralRe: How is afraid of the big bad SQL? Pin
PedroMC14-Nov-08 11:35
PedroMC14-Nov-08 11:35 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon14-Nov-08 8:08
professionalJeremy Falcon14-Nov-08 8:08 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon14-Nov-08 8:12
professionalJeremy Falcon14-Nov-08 8:12 
GeneralRe: How is afraid of the big bad SQL? Pin
Nemanja Trifunovic14-Nov-08 9:06
Nemanja Trifunovic14-Nov-08 9:06 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon14-Nov-08 9:48
professionalJeremy Falcon14-Nov-08 9:48 
GeneralRe: How is afraid of the big bad SQL? Pin
Nemanja Trifunovic14-Nov-08 10:15
Nemanja Trifunovic14-Nov-08 10:15 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon14-Nov-08 10:33
professionalJeremy Falcon14-Nov-08 10:33 
Nemanja Trifunovic wrote:
This paper proves that an application may be vulnerable to SQL Injection
attacks, even though it does proper input validation before calling a stored procedure,
in contrast to conventional wisdom that input validation is sufficient to protect an application
against SQL Injection.


I think you need to read that PDF. Its whole argument is Unicode translation, which any clown knows the difference between VARCHAR and NVARCHAR. Let me quote page 7...

Even if the application calls the SP properly, using parameter objects etc., the input will be
passed to the SP in a varchar variable, which typically does not support Unicode values; an
affected database server will promptly translate this character to a standard quote, breaking
the WHERE clause and causing the dynamic execution to execute whatever arbitrary code was
included in the malicious parameter.


And it's translated when passed so it can be stored in the variable, therefore you can test it in the SP as well to eliminate this if you can't fathom keeping your code in the same charset. So, you *can* double check the input inside the SP and problem solved - which that PDF did not do. Any decent defensive programmer should know this.

And on top of this, any application accepting input in Unicode and doesn't use NVARCHAR is probably someone who's used to programming in VB. Once again, if you have a clue about SQL, protecting it is trivial. And, in your link's example, assuming it's non-Unicode (which is the case) there is no translation involved and it would still work because even in PHP you can't reliably fit a Unicode string inside an ANSI string outside of the first 127 characters without some serious problems that should be caught by the validation routine anyway.

Point is, in that PHP example, that string check is not a Unicode one. And even if it was, checking the SP too would avoid the PDF's point. It's pretty simple to do IMO.

I need this weekend, anyway, that's VB not PHP, and VB stores all its strings as Unicode anyway. So if someone stuffs a Unicode string into a VARCHAR, well, they're VB programmers what can I say.

Nemanja Trifunovic wrote:
Repeating myself again...

1) It is not possible to reliably validate fields if they are going into an SQL statement
2) Even if it was possible, it is too much work and no-one is doing it


Repeating myself again... it is and its easy.

Jeremy Falcon
jeremyfalcon.com[^]

GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon14-Nov-08 8:03
professionalJeremy Falcon14-Nov-08 8:03 
GeneralRe: How is afraid of the big bad SQL? Pin
Nemanja Trifunovic14-Nov-08 8:13
Nemanja Trifunovic14-Nov-08 8:13 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon14-Nov-08 8:22
professionalJeremy Falcon14-Nov-08 8:22 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon11-Nov-08 6:08
professionalJeremy Falcon11-Nov-08 6:08 
GeneralRe: How is afraid of the big bad SQL? Pin
Thomas Weller11-Nov-08 6:56
Thomas Weller11-Nov-08 6:56 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon11-Nov-08 9:47
professionalJeremy Falcon11-Nov-08 9:47 
GeneralRe: How is afraid of the big bad SQL? Pin
Thomas Weller11-Nov-08 22:07
Thomas Weller11-Nov-08 22:07 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon14-Nov-08 8:43
professionalJeremy Falcon14-Nov-08 8:43 
GeneralRe: How is afraid of the big bad SQL? Pin
Thomas Weller16-Nov-08 23:37
Thomas Weller16-Nov-08 23:37 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon17-Nov-08 5:52
professionalJeremy Falcon17-Nov-08 5:52 
GeneralRe: How is afraid of the big bad SQL? Pin
Thomas Weller17-Nov-08 6:03
Thomas Weller17-Nov-08 6:03 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon17-Nov-08 7:47
professionalJeremy Falcon17-Nov-08 7:47 
GeneralRe: How is afraid of the big bad SQL? Pin
Paul Conrad14-Nov-08 11:52
professionalPaul Conrad14-Nov-08 11:52 
GeneralRe: How is afraid of the big bad SQL? Pin
Jeremy Falcon16-Nov-08 9:56
professionalJeremy Falcon16-Nov-08 9:56 
GeneralRe: How is afraid of the big bad SQL? Pin
PedroMC12-Nov-08 2:29
PedroMC12-Nov-08 2:29 
GeneralRe: How is afraid of the big bad SQL? Pin
Thomas Weller12-Nov-08 5:22
Thomas Weller12-Nov-08 5:22 
GeneralRe: How is afraid of the big bad SQL? Pin
Marc Clifton12-Nov-08 1:09
mvaMarc Clifton12-Nov-08 1:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.