asp新闻发布系统雏形之漏洞

来源:百度知道 编辑:UC知道 时间:2024/06/15 21:47:32
我做了个简单的新闻发布系统index.asp页面代码如下:
<%@ LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>主页</title>
<style type="text/css">
<!--
a { text-decorration:none}
a:hover { color:#FF9B06; text-decoration:underline}
.hezi{ background-color:#33CCFF }
.STYLE2 {color: #ECE9D8}
-->
</style>
</head>
<body bgcolor="#330033" text="#ccffff" link="#ccffff" vlink="#FFccFF">
<center>
<h1><font color="#99ffff">动态信息</font></h1>
</center>
<font color="33ffee">新闻标题如下,单击标题链接查看新闻具体内容:</font>

<%
Set dbConn = Server.CreateObject("ADODB.Connection")
dbconn.Open "webdata","sa&quo

<a href="shownews.asp?
author=<%=dbRS(1)%>
&head=<%=dbRS(3)%>
&num=<%=dbRS(0)%>
&tim=<%=dbRS(4)%>
&data=<%=dbRS(2)%>">
<%=dbRS(3)%>
太夸张了,如果你发篇长文 那你url得多长啊!!

URL过长。

你的实现思路有很大问题。

URL不需要将新闻的所有内容传递给新闻显示页面。只需要传递新闻在数据表中的索引。

新闻显示页面根据这个索引向数据库查询获取数据显示。