BigRed1212
Technical User
I just realized I may not have doing what I thought I was doing and I may need to do it. Love that sentence.
Currently I take in user input from a form:
I connect to the database:
I execute a stored procedure:
Should I be adding a step?:
(The above written for me here BTW before I started using the stored procedure and was just doing a direct insert)
and doing something like (not sure of the syntax and how I would do it):
or does just using the stored procedure by itself reduce/eliminate my vulnerability to an injection attack so that I don't need to run the input sanitization?
Currently I take in user input from a form:
Code:
fname=Request.Form("fname")
lname=Request.Form("lname")
city=Request.Form("city")
etc..
I connect to the database:
Code:
data_source - Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" etc .mdb
Set con = Server.CreateObject("ADODB.Connection")
con.Mode = 3
con.Open data_source
I execute a stored procedure:
Code:
con.insert_datathing fname, lname, city, etc..
con.Close
Set con = Nothing
Should I be adding a step?:
Code:
Function DeleteChars(str)
Set regex = New RegExp
regex.pattern="([URL unfurl="true"]http://|\.js|[/URL][\\{}':%()])"
regex.Global = True
DeleteChars = regex.Replace(str,"")
Set regex = Nothing
End Function
and doing something like (not sure of the syntax and how I would do it):
Code:
con.insert_datathing DeleteChars(fname), DeleteChars(lname), DeleteChars(city), etc...
or does just using the stored procedure by itself reduce/eliminate my vulnerability to an injection attack so that I don't need to run the input sanitization?