<%
' ANULO INJECTION EN EL QUERYSTRING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
dim known_bad
dim ii
known_bad = array( "select", "insert", "update", "delete", "drop", "--", "'" )
for ii = lbound( known_bad ) to ubound( known_bad )
if ( instr( 1, request.QueryString, known_bad(ii), 1 ) <> 0 ) then
' si encontró algo de eso, lo mando al carajo:
response.Redirect("http://localhost")
end if
next
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
' Veo si metio un TAG < en algún Form:
dim elemento
For Each elemento in Request.form
if ( instr( 1, Request.form(elemento), "<", 1 ) <> 0 ) then
' si encontró algo de eso, lo mando al carajo:
response.Redirect("http://localhost")
end if
Next
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
dim nombre_archivo
nombre_archivo = request.QueryString("n")
if (request.QueryString("id") = "") or (not isnumeric(request.QueryString("id")) ) then
response.Redirect(application("dominio"))
end if
dim cual_notaId
cual_notaId = replace(request.QueryString("id"), "'", " ")
cual_notaId = trim(left(cual_notaId, 6))
dim rsTapa
set rstapa = server.CreateObject("ADODB.recordset")
rstapa.ActiveConnection = application("conexion")' & nombre_archivo & ".mdb"
rstapa.source = "select * from notas where id= " & cual_notaId
rstapa.open
%>