in reply to RE: Re: directory list
in thread directory list
I'm not sure I'd ever install a CGI script that took an unrestricted directory name from a parameter! Danger, Will Robinson!my $dir = $q->param('imageDir') ? $q->param('imageDir') : '\images'; # or some other default. die "Illegal directory name '$dir'" unless -d $dir; chdir( $dir ) or die "Couldn't cd to '$dir', $!";
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: (4) directory list
by Adam (Vicar) on Sep 21, 2000 at 02:15 UTC | |
by Ovid (Cardinal) on Sep 21, 2000 at 02:26 UTC | |
by merlyn (Sage) on Sep 21, 2000 at 02:24 UTC |