In this node, the monk recommended that someone check out Perl guestbooks at http://cgi.resourceindex.com. I went out and downloaded one of the guestbooks and quickly scanned the code. It's abysmal. No taint checking, no strict, no CGI.pm. The author tries to handle the CGI parsing himself and (as usual) does so incorrectly. What's worse, the following notice is included in the programs:
What that means, in a nutshell, is that you are explicitly forbidden from making the code robust and secure.# Scripts VIZBOOK.CGI, VIZADMIN.CGI, TESTBIN.CGI, MAKEDIR.CGI, PICLOAD +.CGI, # # and VIZADMDEL.CGI were written (c) by Ron F Woolley, Melbourne Austr +alia. # # Copyright 1999,2000. These scripts CANNOT BE ALTERED for personal si +te use # # OR commercial site use except as instructed here in, NOR can whole o +r # # portions of code be copied, AND, + # # all of the header notices in the scripts MUST REMAIN intact as is, A +ND, # # using the scripts without first reading the README file(s), is prohi +bited. # # IF YOU DO NOT AGREE, destroy all files NOW! + #
Please, check the code you recommend. I'm not saying that you should take huge, complex systems that have been written and do a line-by-line analysis, but at least verify the basics: taint, strict, CGI.pm, or whatever else is appropriate.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to Don't blindly recommend code by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |