in reply to Re: Re: Is this safe??
in thread Is this safe??
As described above, use both taint mode and CGI.pm as follows:
It would scare me greatly if you copied this code from a company web page since those pages are now vunerable to a variety of DoS and hack attacks. CGI has tested-true functions for nearly everything you do above. It looks like you could reduce that program to 10 lines or less OF SECURE CODE!#!/usr/bin/perl -wT #warnings and taint mode now enabled use CGI; #you may now use the CGI methods.
On CGI security: If you're not using the inputted data in shell calls, then you're relatively safe. Taint mode specifically checks for this. Of course, some loser can still input some random schlop, so work your CGI with "valid entry or reject"/deny-allow in mind. As I said earlier, CGI.pm provides numerous functions for EXACTLY what you are doing (and doing incompletely), including character escaping, so click that link and read the docs on it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Too late for "-T"?
by SilverB1rd (Scribe) on Feb 07, 2001 at 03:47 UTC | |
by arturo (Vicar) on Feb 07, 2001 at 03:49 UTC | |
by SilverB1rd (Scribe) on Feb 07, 2001 at 19:49 UTC | |
by Maclir (Curate) on Feb 07, 2001 at 04:25 UTC | |
by SilverB1rd (Scribe) on Feb 07, 2001 at 21:14 UTC | |
|
Thanks
by SilverB1rd (Scribe) on Feb 07, 2001 at 01:54 UTC |