|
Posted by Gordon Burditt on 11/15/07 00:56
>I have a simple voting page using php and mysql and wonder how I can
>prevent users from voting twice.
First, think about the problem. What's a "user"? A human being, right?
There's a big difference between a human and an IP address. You'll
have both false negatives and false positives.
- Users behind proxies may get locked out as only one vote in the whole
company is allowed.
- Multiple users in the same family (using the same computer) can't all vote.
- Dial-up users getting dynamic IP addresses can probably vote once each
time they dial up.
- Users between proxies that use many IP addresses may be able to vote many
times.
Now, why are you holding a vote? And who is eligible to vote?
If this is a vote for an elected office, it ought to be a capital
crime to hold a vote that can't be re-counted, and that means a
chad-free paper trail. And, yes, I'm including offices like student
council representative of Section 5 of Grade 2 at Jeffery Dahmer
Elementary School, assistant White Poodle catcher, and vice-president
of the PTA along with more traditional ones like Governor or
Vice-President of the USA.
Even national elections have a lot of problems with this, and they
sign up voters and check off who voted against lists. Problems
include people registering to vote multiple times (possibly at
different locations), ineligible voters (including the dead)
registering, people presenting fake ID to vote multiple times,
people coercing other people to vote in a particular way, vote
selling, etc. This doesn't even include problems that all the
candidates suck.
If this is for some kind of survey, have you ever heard of statistical
validity of results? To start off with, you're going to have
problems with (a) a self-selected sample (people who don't LIKE <x>
music probably won't answer a survey about <x> music), (b) multiple
voting and people getting locked out of voting, and (c) not getting
a representative set of votes from the population of interest.
>Here are three ways:
>1. IP locking or IP locking with a time limit
>The same IP address can not vote twice, or not vote twice within the
>time limit.
>2. Cookies, weak version.
>If the user has cookies turned on they can only vote once. The cookie
>may be stored on the server and last till the browser is closed, or on
>the client and last till the user deletes it.
>If the user has cookies turned off they can vote as many times as they
>like.
>
>3. Cookies, strong version
>If the user has cookies turned on a cookie (session variable) is
>stored on the server and last till the browser is closed.
>If the user has cookies turned off they are told to turn it on for at
>least the present site.
>
>I exclude any options that uses usernames and/or passwords as that
>would be too cumbersome for most users.
The problem is, that "too cumbersome" method of issuing ID isn't
enough in practice.
I'll suggest voting with a confirmation email address. One vote
per email address (on a particular vote), which has to be valid
since they have to receive mail at it to do the confirmation. This
DOES have disadvantages, as multiple email addresses aren't uncommon,
but most people (except those who manage servers) don't have HUGE
numbers of email addresses.
>Disadvantages with each method:
>
>1. Users behind a proxy have the same IP address. This means that if
>one has cast a vote, the others can't or have to wait a certain time
>to do so.
>
>2. This allows repeated voting too easily.
>
>3. People may decide not too vote as they do not want to take the time
>to turn cookies on for the present site, or are generally sceptical
>about cookies at all. They may vote again when they reopen the
>browser.
4. People may not vote because they are afraid of SPAM.
>
>Personally I like best method 3, but post my thoughts here to hear
>your ideas.
>
>Are there other ways than the 3 listed? Which one do you like the
>best? Why?
Navigation:
[Reply to this message]
|