jcpunk has asked for the wisdom of the Perl Monks concerning the following question:
Insecure dependency in `` while running with -T switch is my error... it seems as though the statement should be safe and untainting right? so what have i done wrong?#!/usr/local/bin/perl -wT use strict; use CGI; ... $username =~ s/\W//g; if ($username =~ /(\w{2,16})/) { $username =~ $1; $username =~ tr/[A-Z]/[a-z]/; } else { #since username isnt able to be safe, it is empty $username =""; } `/bin/echo $username`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: a terribly basic question showing my inept skills with regular expressions
by bart (Canon) on May 17, 2003 at 21:31 UTC | |
|
Re: a terribly basic question showing my inept skills with regular expressions
by Enlil (Parson) on May 17, 2003 at 22:25 UTC | |
|
Re: a terribly basic question showing my inept skills with regular expressions
by CountZero (Bishop) on May 18, 2003 at 07:45 UTC | |
|
Re: a terribly basic question showing my inept skills with regular expressions
by dws (Chancellor) on May 18, 2003 at 05:22 UTC |