使用自动生成的 URL 作为一种密码

发布于 2024-10-27 08:08:47 字数 452 浏览 8 评论 0原文

假设我希望我网站的访问者能够填写一份长表格。他们不需要填写它来使用该网站,但如果他们想向我发送一个故事,他们需要填写它。所以,他们中的一些人愿意这样做,有些人则不愿意。该表格非常大,因此访问者可能希望将其保留为半填写状态,以便稍后再回来完成。为了使访问者的过程尽可能简单,我希望他只需单击“创建故事”链接,该链接会将访问者重定向到自动生成的网址,例如www.mysurveys.com/7Bs3h4vSWEe。在这里,访问者处理他的表单,并在想要保存表单以便稍后返回完成表单时单击“保存”。表单数据及其生成的 ID 保存在数据库中。当访问者认为表格已正确填写并完成时,他单击“发送以供审核”,然后表格就会发送给我。

问题是:使用这个自动生成的 URL 作为用户的唯一凭证有多安全?我想任何嗅探器都可以轻松获取访问者用来填写表单的网址。如何使这样的过程尽可能简单?有什么方法可以让它更安全一点?我知道我可以使用标准用户注册模式来做到这一点,但我想让它更简单。

Assume I want visitors of my site to be able to fill in a long form. That's not necessary for them to fill it in to use the site, but if they want to send a story to me, they need to fill it in. So, some of them will wish to do it, some won't. The form is quite large so visitor may want to leave it semi-filled to come back later and finish it. To make the process as easy as possible for the visitor, I want him just to click a link "Create a story" that will redirect the visitor to an automatically generated url, like www.mysurveys.com/7Bs3h4vSWEe. Here the visitor works with his form and clicks 'Save' when he wants to save it so that to return back later to finish it. The form data is kept in the database with its generated ID. When the visitor thinks the form is filled properly and is done, he clicks 'Send for review' and then the form goes to me.

The question is: how secure is to use this automatically generated URL as the only credential for the user? I suppose any sniffer could easily get the url visitor uses to fill in the form. How to make a process like this as simple as possible? What are ways to make it a little more safe? I know I can do it using standard user registration pattern but I want to make it simpler.

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

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

发布评论

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

评论(2

╄→承喏 2024-11-03 08:08:47

这个 ID 很像用户的会话 ID,从这个意义上说,它不是一个妥协。一个区别是会话 ID 应该始终过期。如果考虑安全性,则应使用 HTTPS 来防止窃听。

此 url 值应为 加密随机数。您还应该考虑暴力。如果有人猜测了很多不存在的密钥,请用验证码提示他们。

This ID is a lot like having a session id for the user and in that sense its not a compromise. One difference is that session id's should always expire. If security is a concern then HTTPS should be used to prevent eavesdropping.

This url value should be a Cryptographic Nonce. You should also take brute force into consideration. If someone is guessing a lot of keys that don't exist, prompt them with a captcha.

够钟 2024-11-03 08:08:47

它不是那么安全,但嗅探基本上是唯一的攻击,除非攻击者不关心他们获得的 URL,否则他们必须非常明确地瞄准受害者。

例如,我不会将其用于财务信息或第三方机密信息,但对于低风险信息,它可能没问题。

编辑:我忽略了暴力,但同样适用,并且正如其他答案所暗示的那样,有针对这种情况的保护措施,例如验证码。

It's not that secure, BUT sniffing is basically the only attack, AND unless the attacker doesn't care whose URL they get, they would have to target their victim quite specifically.

I wouldn't use this for, for example, financial information, or third-party-confidential information, but for low-risk information it might well be fine.

edit: I've ignored brute force, but much the same applies, and as other answers suggest, there are protections against that, like captcha.

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