Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper way to instantiate a class
Message
From
24/12/2005 03:50:42
 
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01079105
Message ID:
01080684
Views:
27
>Michel, Correct me if I am wrong, but usually the string delimiter in SQL is a single quote, thus easy to escape out, changing your sample above to:
>
>
>loDataAdapter.cSQL="SELECT MyField FROM MyTable WHERE MyColumn='"+lcMyValue+"'"
>
>
>And then passing "hello';drop table master.dbo.anyguess;go;select '" you can see how you can inject some potentially dangerous commands in there. Another thing simple thing that I like to test is whether the uuencode/decode is used to prevent another mischief, as in entering
<script>alert('Hello world');</script>
in a filed that is saved in the database and later displayed on a browser. If you encode the result correctly the actual value stored would be
&l t ;script& g t ;alert("Hello World
and so on, other wise everytime that field is resposed.written youy would actually cause the code to execute.

Thanks, I am now understand betting this situation. I also resolved the issue of properly instantiating and calling my data object, with parameters.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform