我正在尝试使用下面的表单为我正在处理的应用程序进行用户注册和登录。
<html><form method="get" action="login">
Email Address: <input name="email" type="text"><br/>
Password: <input name="password" type="password"><br/>
<input type="submit" value="Submit" />
</form>
</html>
但是,用户名和密码会显示在url中,提交按钮也是如此。
http://localhost:8080/login?email=123&password=123&submit=Submit
我如何阻止这种情况的发生?
发布于 2011-10-13 02:53:21
它们出现在URL中是因为您的表单使用的是GET方法,您应该使用POST并在服务器端处理这些值。
发布于 2011-10-13 03:03:11
除了POST/GET混淆之外,肖恩指出,你可能会对Cherrypy的内置authentication tool感兴趣。
https://stackoverflow.com/questions/7744918
复制相似问题