salve,
volevo chidervi se lo script che vi posto di seguito e' sufficientemente protetto contro l'sql injection.
nel caso non lo fosse che accorgimenti devo adottare?
grazie
<%
Dim nome_ut
Dim pass
nome_ut = Replace(Request.Form("username"), "'", "''")
pass = Replace(Request.Form("password"), "'", "''")
Dim cn
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath("xx.mdb")
Dim sql
sql = "SELECT ID FROM admin WHERE username='" &nome_ut&_
"' AND PASSWORD='" &pass& "'"
Dim rs
Set rs = cn.Execute(sql)
Dim autenticato
if rs.eof then
autenticato = false
else
autenticato = true
end if
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
if autenticato1 = true then
Session("Autenticato") = "OK"
Response.Redirect("xx.asp")
else
Response.Redirect("xx.htm")
end if
%>

Rispondi quotando
