用户可以复制隐藏字段数据吗?

发布于 2024-10-05 01:41:44 字数 143 浏览 0 评论 0原文

我有一个包含许多隐藏字段的表单。当用户从表单中选择文本并将其粘贴到文本编辑器中时,他们可以看到隐藏字段的值。这不会发生在每个人身上。然而,对于遇到这种情况的用户来说,他们在所有浏览器上都会遇到这种情况。我无法复制这个。有关可能出现问题的任何线索吗?

干杯,

I have a form with many hidden fields. When a user selects text from the form and pastes it in to a text editor - they can see the values of the hidden fields. This doesn't happen to everyone. However, for the users that are experiencing this, they experience it across all browsers. I haven't been able to replicate this. Any clues as to what might be the problem?

Cheers,

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

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

发布评论

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

评论(1

戒ㄋ 2024-10-12 01:41:45

你是如何隐藏字段的?如果您使用 CSS visibilty:hidden,那么这些字段仍会占用渲染页面上的空间,并且可能可选择也可能不可选择。要使用 CSS 隐藏字段,请使用 display:none ,这应该会阻止浏览器在页面上分配渲染空间。

请记住,无论它们如何隐藏,“查看源代码”都会显示它们,因此不要将安全敏感数据放入其中。

How did you hide the fields? If you used CSS visibilty:hidden then the fields still take up space on the rendered page and may or may not be selectable. To hide fields with CSS use display:none which should prevent the browser from allocating rendered space on the page.

Remember that no matter how they're hidden, "view source" will reveal them, so don't put security-sensitive data in them.

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