开发者

Using an automatically generated URL as a kind of a password

开发者 https://www.devze.com 2023-02-20 04:00 出处:网络
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 i开发者_Go百科n to use the site, but if they want to send a story to me, they need to fil

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 i开发者_Go百科n 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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号