【发布时间】:2017-02-02 17:13:43
【问题描述】:
添加安全问题,以便用户在超过最大尝试次数时可以重置密码。为身份验证机制做这些隐藏字段是不是很糟糕?
<input type="hidden" name="securityAnswered" value=true>
<input type="hidden" name="exceededAttempts" value=true>
用户可以从客户端进入并编辑这些隐藏字段吗?
【问题讨论】:
-
如果您使用的是 google chrome 或 firefox,您可以简单地更改它,只需右键单击并选择 Inspect Element Item ,然后您可以更改客户端事物的值
-
还有其他程序可以执行此操作,例如 firebug ,...
-
在您的控制台中,执行:
document.querySelector("input[name=securityAnswered]").value = "wibble"
标签: html security hidden-field