Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

Build a Perl/CGI Voting System

By Allan Peda
2005-07-05


Details: E-mail gotchas

Allowing users to send e-mail from your Web server is a risky move since spammers could potentially exploit your host to send unsolicited e-mail. In order to minimize the possibility of such an exploit, the script always checks to determine if the e-mail is being sent to an acceptable address. You could further tighten the system by modifying the validation method voter_is_okay() within the DraftBallot class to consult a list of acceptable e-mail addresses. Effectively, this would require users to register in advance to vote.

Other methods of preventing duplicate votes could involve collecting IP addresses or setting cookies on the client, but I rejected these approaches as it is likely that many students would use shared public terminals on campus.



Tutorial Pages:
» Using locked DBM files with CGI-driven forms saves client data without DBMS overkill
» CGI considerations: Simplicity vs. complexity
» Functional design considerations
» Details: Hash keys
» Details: E-mail gotchas
» Details: Not-so-secret ballots
» Details: File layout
» Details: Static vs. dynamic DNS
» Details: Is GET harmful?
» Other possible improvements
» Conclusion
» Resources


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» Random subroutines in Perl
» Log Script Use
» Creating Perl Modules for Web Sites
» Bit Vector, Using Perl Vec
» Perl Range Operator
» Creating Perl Modules for Websites

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources