Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2004, 04:15 PM
shs shs is offline
Authorized User
 
Join Date: Mar 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I guess if you use stored procedures then you don't have to worry about SQL injection attack.

Quote:
quote:Originally posted by bmains
 Stu,

By the way, to prevent against SQL injection attacks, you may want to not allow characters such as "--", "*", etc., because that may alter the SQL string that you are running against.

If you want to know more about it, here is an example from a web site. There is a link to the answers at the bottom of the page:

http://www.counterhack.net/when_trin...he_irs_d-.html

Brian
 
Old May 18th, 2004, 08:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

Yes, using stored procedures definitely helps, although it also depends on how you code your stored procedure too.

Brian
 
Old May 18th, 2004, 04:06 PM
shs shs is offline
Authorized User
 
Join Date: Mar 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Brian,
It is probably not a correct section of this forum to ask this question but could you elaborate on your comment please?
How should a stored procedure be written to avoid SQL Inj Atts?

Thanks
Quote:
quote:Originally posted by bmains
 Hello,

Yes, using stored procedures definitely helps, although it also depends on how you code your stored procedure too.

Brian
 
Old May 19th, 2004, 08:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Please note that I'm a SQL Server guy. Creating a proc can be SQL injection safe, however, if you create a dynamic SQL string and execute it using exec or sp_executeSQL (which I've done), you can run into problems with SQL injection. I just tested out a query on my machine and was able to retrieve information from SQL server that the user shouldn't be able to use.

It also depends on how you input the information into the system also. Passing the values to be selected from a database through the querystring can pose problems, because that is easily hackable.

Just something to think about,

Brian
 
Old January 6th, 2005, 01:03 PM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sudhirshams
Default

Guys,
I am using regularexpressionvalidator to validate Numbers in a Texbox. I want to allow value like ($430) or -430 in the textbox. Which Expression should I use for that. These value are the amout of the Invoice. I am using ^\$?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$
for this. What Should I do to allow "-" sign or ($430) in the value.
any help appreciated.
Thanks
Sudhir





Similar Threads
Thread Thread Starter Forum Replies Last Post
Input Validation sams ASP.NET 2.0 Professional 4 June 12th, 2007 03:29 AM
Validation to input fields amol_0008 XML 1 May 30th, 2007 04:36 AM
Input validation in JFormattedTextField harini19 Java Basics 2 November 14th, 2006 01:50 AM
Input Validation Maxood C++ Programming 11 August 6th, 2004 02:55 PM
Validation of TextBox Input bpgadhia ASP.NET 1.0 and 1.1 Professional 1 March 16th, 2004 05:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.