now, that is, what I call help!
thank you very MUCH!!!!
since I removed all unwanted files from the array @files earlier while
reading the directory contents, I simply changed:
$file =~ /^(\w\.)+$/;
to
$file =~ /^(.+)$/;
and it works!!!!
and again, thank you for taking your time to respond and explaining things.
> On (09/01/03 17:35), Alex Blum wrote:
> > ok. there's two options:
> > 2. I fix this.
>
> Good choice!
>
> > can someone help me please? I'm stuck with this, and don't know, how to
> > solve the problem. just in case: I did read the
> > "Chapter 23. Security" of programming perl (3rd edition) and still don't
> > know any way out of this...
>
> First, you need to realize why Perl is die'ing with taintmode errors. If
> you haven't figured that out, it is becuase you are gathering the list
> of files by reading a directory in the following line:
>
> > my @files = readdir DIR;
>
> Now, everything in the @files array is considered tainted by Perl. To
> untaint, you pass your data through a regex as follows (untested!):
>
> my @cleanfiles;
> foreach my $file (@files) {
> $file =~ /^(\w\.)+$/; # allow only alphanum and dot
> push @cleanfiles, $1;
> }
>
> Try working with the above to see if you can get your array untainted
> *before* passing it off to chmod.
>
>
> Good luck,
> William
--
- Alex
ICQ-#: 40011562
mailto:[EMAIL PROTECTED]
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr f�r 1 ct/ Min. surfen!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]