请看看这段代码是否存在漏洞
function strLength(str)
dim WINNT_CHINESE
WINNT_CHINESE=(len("例子")=2)
if WINNT_CHINESE then
dim l,t,c
dim i
l=len(str)
t=l
for i=1 to l
c=asc(mid(str,i,1))
if c<0 then c=c+65536
if c>255 then
t=t+1
end if
next
strLength=t
else
strLength=len(str)
end if
end function
user=request.form("user")
pass=request("pass")
olduser=user
user=replace(user,"'","''")
error=""
'---------验证是否输入用户名-----------
if user="" then
error=error&"<br>错误:请输入用户名!"
end if
'---------验证是否输入密码-------------
if pass="" then
error=error&"<br>错误:请输入密码!"
end if
if error<>"" then
response.write error
response.end
end if
if isObject(application("chateisldi") then%>
<!-- #include file=database.asp -->
<%
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from username where username='"&user&"'"
rs.open sql,application("searchlinkzzz"),1,1
if not rs.eof then
if trim(rs("pass"))<>pass then
response.write "错误密码!"
rs.close
set rs=nothing
response.end
else
session("pass")=trim(rs("pass"))
id=rs("ID")
rs.close
set rs=nothing
response.clear
response.redirect "aa.asp?id="&id
end if
else
response.write "错误:没有找到用户!"
rs.close
end if
set rs=nothing