in reply to Re: Re: Possible Security Problem
in thread Possible Security Problem
Which will allow directory names with any alphanumeric characters plus the underscore. Remember not to check for invalid characters (you could miss some), but to only allow valid ones (like the code above).foreach (@dir) { s/^(\w+)$/$1/ || do { generate some error message, or skip this directory }; }
A similar untainting should probably be applied to user-supplied data, plus checking that it is in the list of valid directories.
--ZZamboni
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid - readdir) Re(2): Possible Security Problem
by Ovid (Cardinal) on May 01, 2001 at 19:19 UTC | |
|
Re: Re: Re: Re: Possible Security Problem
by Stamp_Guy (Monk) on May 01, 2001 at 17:41 UTC |