Click here to Skip to main content
15,888,325 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHelp with a static class Pin
Stephen Holdorf15-May-15 2:10
Stephen Holdorf15-May-15 2:10 
QuestionRe: Help with a static class Pin
Richard MacCutchan15-May-15 3:02
mveRichard MacCutchan15-May-15 3:02 
SuggestionRe: Help with a static class Pin
Richard Deeming15-May-15 3:56
mveRichard Deeming15-May-15 3:56 
GeneralRe: Help with a static class Pin
Stephen Holdorf15-May-15 4:09
Stephen Holdorf15-May-15 4:09 
GeneralRe: Help with a static class Pin
Richard Deeming15-May-15 4:11
mveRichard Deeming15-May-15 4:11 
GeneralRe: Help with a static class Pin
Stephen Holdorf15-May-15 6:52
Stephen Holdorf15-May-15 6:52 
GeneralRe: Help with a static class Pin
Richard Deeming15-May-15 7:04
mveRichard Deeming15-May-15 7:04 
GeneralRe: Help with a static class Pin
Sascha Lefèvre15-May-15 8:23
professionalSascha Lefèvre15-May-15 8:23 
Maybe you have the completely wrong idea about what SQL-injection is.

It does not mean that your query string, after being concatenated (wrong approach) can somehow still be modified by someone and that you therefore have to "hide" it somehow (in your QueryContainer).

It means that the values you get from user input (or from somewhere else outside your controllable domain) can already contain malicious SQL-statements. And currently you blindly concatenate them into your SQL-statement.

While SQL-Parameters can not prevent that your values can contain malicious SQL-statements, they do prevent that these will be executed by your database when you're executing your SQL-statement. Because the values will be treated just as values and not potentially as SQL-statements.

If you have understood this, then you will realize that your current approach to fixing this makes no sense.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

GeneralRe: Help with a static class Pin
Stephen Holdorf18-May-15 1:47
Stephen Holdorf18-May-15 1:47 
GeneralRe: Help with a static class [modified] Pin
Sascha Lefèvre18-May-15 2:07
professionalSascha Lefèvre18-May-15 2:07 
GeneralRe: Help with a static class Pin
Sascha Lefèvre18-May-15 2:10
professionalSascha Lefèvre18-May-15 2:10 
GeneralRe: Help with a static class Pin
Richard Deeming18-May-15 2:36
mveRichard Deeming18-May-15 2:36 
GeneralRe: Help with a static class Pin
Stephen Holdorf18-May-15 3:48
Stephen Holdorf18-May-15 3:48 
GeneralRe: Help with a static class Pin
Richard Deeming18-May-15 3:50
mveRichard Deeming18-May-15 3:50 
GeneralRe: Help with a static class Pin
jkirkerx18-May-15 12:19
professionaljkirkerx18-May-15 12:19 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 3:02
Stephen Holdorf20-May-15 3:02 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 4:22
professionalSascha Lefèvre20-May-15 4:22 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 4:28
Stephen Holdorf20-May-15 4:28 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 4:34
professionalSascha Lefèvre20-May-15 4:34 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 4:40
Stephen Holdorf20-May-15 4:40 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 4:43
professionalSascha Lefèvre20-May-15 4:43 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 4:45
Stephen Holdorf20-May-15 4:45 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 4:54
professionalSascha Lefèvre20-May-15 4:54 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 5:21
Stephen Holdorf20-May-15 5:21 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 5:26
professionalSascha Lefèvre20-May-15 5:26 

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.