in reply to Re: issues displaying cgi script source?
in thread issues displaying cgi script source?

I locked down this script using some of the methods you suggested mbut was not able to use taint mode. I got the famous error saying it was too late for taint mode. I tried -wT, -Tw, -w -T, -T -w. The only way I could get taint mode to be used was envoke it via command line but this is not an option running the script over the web.

I changed the two-arg-open call to a three-arg-open after your explanation. I had never considered the laziness of the two-arg implication function.


www.perlskripts.com
  • Comment on Re^2: issues displaying cgi script source?

Replies are listed 'Best First'.
Re^3: issues displaying cgi script source?
by diotalevi (Canon) on Jul 06, 2004 at 22:35 UTC
    #!/usr/bin/perl -wT

    Um... that should be enough. Are you using mod_perl instead of cgi? That would do that - you'd load -T during the startup.pl in your apache configration then.

      Nope just using cgi. I was somewhat confused by the error also. Also if you would please email me with the details of what you found in the submit-source script at ziation@perlskripts.com. I see the section you are talking about and again I used a two-arg-open call but the target file to write too is not passed as a cgi perameter like in the previous script. I have only looked into it for about 10 minutes but cannot see a way to modify the target file path.

      www.perlskripts.com

        Try this from a directory that contains a subdirectory named review.

        my $name = "../broken.pl"; open(FILE, ">review/$name") || die "Can't write to review/$name!\n"; print FILE "Hi"; close FILE;

        Notice that it creates a broken.pl in the current directory instead of the subdirectory.

        antirice    
        The first rule of Perl club is - use Perl
        The
        ith rule of Perl club is - follow rule i - 1 for i > 1

        A reply falls below the community's threshold of quality. You may see it by logging in.