good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Preventing multiple votes by same user effecientlyby samtregar (Abbot) |
on Oct 26, 2002 at 19:40 UTC ( [id://208269]=note: print w/replies, xml ) | Need Help?? |
The problem here is basically that identifying a unique individual over the web is not easy. Your best bet is to use an email-based authentication scheme, since most users only have one or two email addresses and don't share them with anyone else. Here's a rough sketch of a scheme I've seen used to good effect:
Of course, this system is not perfectly secure. A suitably motivated person with control of a domain name could write a script to automate the process of generating valid email address and key pairs. However, it is definitely safe against your average jerk with an LWP script. And it's really not very hard to code. I'd estimate it at around 20-30 lines of code, using all the best that CPAN has to offer. If you're into security through obscurity, one thing you can do to make script writing much harder is to randomize your form. Just mix up the names of the form parameters and the values that represent to answers. If a script writer has to actually parse the form HTML to figure out what results to send back to the server, they might not bother. Or, they might become inspired and spend all night writing an elaborate hack to show off to their friends. You never know! -sam
In Section
Seekers of Perl Wisdom
|
|