Hola
Varios apreciaciones
Para evitar la inyección SQL ese replace no es suficiente. Usa esta función
Código ASP:
Ver originalDim str
Public Function Limpiar(strlimpiar,modolimpiar)
'modolimpiar = 0 Prepara strlimpiar para un login y evita sql injection
str = trim(strlimpiar)
Select Case modolimpiar
Case 0:
str = lcase(str)
str = replace(str," "," ")
str = replace(str,"=","")
str = replace(str,"'","")
str = replace(str,"""""","")
str = replace(str," or ","")
str = replace(str," and ","")
str = replace(str,"(","")
str = replace(str,")","")
str = replace(str,"<","[")
str = replace(str,">","]")
str = replace(str, "%", "")
str = replace(str, "*", "")
str = replace(str,"--","")
str = replace(str,"having ","")
str = replace(str,"group by","")
str = replace(str,"union select sum","")
str = replace(str,"union select min","")
str = replace(str,"select ","")
str = replace(str,"insert ","")
str = replace(str,"update ","")
str = replace(str,"delete ","")
str = replace(str,"drop ","")
str = replace(str,"-shutdown","")
str = replace(str, "iframe", "")
Case Else
str = strlimpiar
End Select
Limpiar = str
End Function
¿Para qué haces esta evaluación otra vez?
Cita: if rs("login_per")=usuario and rs("clave_per")=password then
Ahora la respuesta, igual que creas esta variante de sesión
session("autorizacion")=1, crea otra con el valor del nombre del usuario
Cita: session("usuario")=rs.Field("login_per")
Suerte