本文介绍了如何修补或修复.asp中的sql注入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<!--#include file=../db.asp-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="styles.css" rel="stylesheet" type="text/css">
<title>Validate Login </title>
</head>
<body>

<p>&nbsp;</p>
<p>&nbsp;</p>
<table border="0" align="center">
  <tr>
    <td align="center" valign="top"><%
dim rs
if Request.Form("LoginID")<>"" and Request.Form("Password")<>"" then
	Set rs=Server.CreateObject("ADODB.RecordSet")
	rs.open "Select role from users where [UserID]='" & Request.form("LoginID") & "' and [Password]='" & Request.Form("Password") & "'",con,1,3
	if not rs.eof  then 
		Session("LoginID")= Request.form("LoginID")
		response.redirect("Managenews.asp")
	else
		response.write ("<h1 class=articleheader> Invalid login or password...</h1>")
		response.write ("<h3> <a href=index.htm class=txtlinks> Please Try Again...</a></h3>")
	end if
End if	
%></td>
  </tr>
</table>

</body>
</html>

推荐答案



这篇关于如何修补或修复.asp中的sql注入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 09:39