【发布时间】:2014-05-12 14:35:03
【问题描述】:
我正在尝试为我的学校制作一个网站,而我刚刚从基础开始到测试
我们网站的安全性,据观察,在从那里获取此输出的同时
如果我们输入 Name: ../ 和 Information : (any html code) 则它会更改该页面
到注入的那个html代码中。有什么解决方案可以防止这种情况
问题让我有更高的安全性。HTML 代码是
<html>
<head>
<title>Submit your form</title>
</head>
<body bgcolor="Black" text="#FFFFFF" link="#FFF833" vlink="#FFF833">
<center><table width=600 cellspacing=0 cellpadding=0 align="center"><tr><td>
<font face="verdana" size=2><b>Use this form to submit your information to the website.<br /><Br>Note:Information will be stored online immediately but will not be listed on the main page until it has a chance to be looked at.<br /><br />
<form action="submit.php" method="post">Name:<br />
<input type="text" name="name">
<br /><br />Information<br /><textarea rows=15 cols=40 name="text"></textarea>
<br /><br /><input type="submit" value="add text"></form></font>
</b></td></tr></table>
</center>
</body>
</html>
【问题讨论】:
-
这完全取决于您如何保存此用户输入...
-
但是仍然有人可以只输入他自己的代码并更改我们的网站主页。
-
这完全取决于您如何保存此用户输入...