从文本框中读取或插入文本框时可以执行 HTML 吗?

发布于 2024-07-28 00:02:59 字数 111 浏览 3 评论 0原文

我有一个关于 ANTIXSS 实施的问题。 如果我要从页面上的文本框中读取值并将其直接存储到数据库中,然后从数据库中读取值并将其插入到文本框中,那么是否有可能在该过程中执行标签或类似内容? 问候, 安迪

I have a question regarding ANTIXSS implementation. If I was to read values from a textbox on a page and store it into a database directly and then read value from the database and insert it into a textbox, then is there a chance that the tag or similar could be executed in the process ?
Regards,
Andy

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初与友歌 2024-08-04 00:02:59

最好假设所有用户输入的数据都可能是恶意的。 不要根据使用情况对输入进行编码,因为您对数据的使用可能会发生变化 - 始终对用户输入的值进行编码,这样您就可以有效地消除任何潜在的问题。

It is best to assume that all user inputted data is potentially malicious. Don't encode input based on usage as your usage of the data may change - always encode user inputted values and you will have effectively removed any potential problems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文