in reply to Security?
The first rule of writing secure web applications is to never trust your input. If your code assumes that the value of a particular parameter is in a particular format then you should use a regex or similar to confirm/enforce that assumption. There are plenty of other potentially dangerous operations apart from those you list. Enabling Perl's taint mode forces the programmer to think more about what input they should accept and what operations are potentially dangerous.
Having said that, the subroutine you supply does not confirm that input matches expectations. Instead, it looks for some bizarre literal sequence of characters and removes them if they're there. This would do absolutely nothing to achieve the stated purpose of ensuring that "nobody can crack the box through his scripts".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Security?
by perlplexer (Hermit) on Apr 24, 2003 at 01:59 UTC | |
by grantm (Parson) on Apr 24, 2003 at 02:23 UTC | |
by antirice (Priest) on Apr 24, 2003 at 02:10 UTC | |
by perlplexer (Hermit) on Apr 24, 2003 at 02:43 UTC |