asp 网站 XSS跨站脚本漏洞如何修复

 

我的站  www.ehouse2008.com 出现XSS跨站脚本漏洞,该如何修复!网站源码:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="include/conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
        set rs_xx=server.CreateObject("adodb.recordset")
        sql_xx="select * from System_isSystemConfig_Table"
        rs_xx.open sql_xx,dconn,1,1
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=rs_xx("SiteInfo")%></title>
<meta name="Keywords" content="<%=rs_xx("Keywords")%>" />
<meta name="Description" content="<%=rs_xx("descriptions")%>" />
<%rs.close%>
<link href="css.css" type="text/css" rel="stylesheet" />
</head>

<body>
<table width="1004" height="1046" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><!--#include file="top.asp"-->

      <table width="1004" height="170" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="286" height="5"></td>
          <td width="718"></td>
        </tr>
<tr>
          <td height="165" align="left" valign="top"><!--#include file="left.asp"--></td>
          <td align="right" valign="top"><table width="670" border="0" cellspacing="0" cellpadding="0" style="border:1px #6d4f46 solid">
            <tr>
                        <%
                        bigclass=replace(request.QueryString("bigclass"),"'","''")
            biaclass=replace(request.QueryString("biaclass"),"<script>","''")
                        if bigclass="" then
                        rs.open "select * from news where ntype='产品展示' order by id desc",dconn,1,1
                        bigclass=rs("bigclass")
                        else
                        rs.open "select * from news where bigclass='"& bigclass &"' order by id desc",dconn,1,1
                        end if
                        %>
              <td height="35" align="left" valign="middle" style="text-indent:15px; line-height:25px; border-bottom:1px #6d4f46 solid">当前位置:首页 &gt;&gt; <%=bigclass%></td>
            </tr>
            <tr>
              <td height="398" align="left" valign="top">
                          <div style="width:706px;">
                <%
                        if rs.eof then
                                        response.Write("<br/>&nbsp;内容正在编辑当中……")
                        else
                        rs.pagesize=6
                        yeshu=replace(request.QueryString("yeshu"),"'","''")
                        yeshu=replace(request.QueryString("yeshu"),"<script>","''")
                        if int(yeshu)="" or int(yeshu)<1 then
                                yeshu=1
                        end if
                        if int(yeshu)>rs.pagecount then
                                yeshu=rs.pagecount
                        end if
                        rs.absolutepage=yeshu
                        i=(yeshu-1)*rs.pagesize+1
                        do while not rs.eof and j<rs.pagesize
                %><div style="width:210px; height:180px; float:left">
                          <table width="210" height="180" border="0" align="left" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="150" align="right"><table width="1" border="0" cellspacing="0" cellpadding="0" style="border:1px #333333 solid">
                      <tr>
                        <td><a href="product_in.asp?id=<%=rs("id")%>"><img src="<%=rs("pic")%>" width="169" height="131" border="0" style="margin:2px" /></a></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td align="center"><a href="product_in.asp?id=<%=rs("id")%>"><%=rs("ntitle")%></a></td>
                </tr>
              </table>
                          </div>
                <%
                                i=i+1
                                j=j+1
                                        rs.movenext
                                loop
                        end if
                        rs.close
                        %></div></td>
            </tr>
            <tr>
              <td height="30" align="center" valign="middle"><a href="product.asp?yeshu=1&bigclass=<%=bigclass%>">首页</a> <a href="product.asp?yeshu=<%=yeshu-1%>&bigclass=<%=bigclass%>">上一页</a> <a href="product.asp?yeshu=<%=yeshu+1%>&bigclass=<%=bigclass%>">下一页</a> <a href="product.asp?yehsu=<%=rs.pagecount%>&bigclass=<%=bigclass%>">末页</a></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="1004" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="5"></td>
        </tr>
      </table>
      <!--#include file="footer.asp"-->
    </td>
  </tr>
</table>
</body>
</html>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值