Whiteknight
02-14-2004, 03:52 PM
I have a perl CGI script that takes file path arguments from the command line, and reads the specified files. pretty standard stuff i imagine.
anyway, I want to restrict access to certain paths, so that people cant access information to the parent directory, or my .htaccess files.
i've tried this bind to restrict accessing the parent directory:
$page_location =~ s/../denied/;
so that you couldnt type in "mycgi.cgi?../otherfiles.stuff"
but it always returns an error on the page.
any suggestions?
anyway, I want to restrict access to certain paths, so that people cant access information to the parent directory, or my .htaccess files.
i've tried this bind to restrict accessing the parent directory:
$page_location =~ s/../denied/;
so that you couldnt type in "mycgi.cgi?../otherfiles.stuff"
but it always returns an error on the page.
any suggestions?