in reply to Re: problem with Crypt::PBKDF2
in thread problem with Crypt::PBKDF2
get_params has:my %hash = map { split(m'='x, $_, 2) } grep { m'='x } split(m'&'x, get_params());
and, finally, the sanitize code:my $query = join('&', map { $_ . '=' . sanitize($cgi->param($_)) } san +itize($cgi->param()));
sub sanitize($) { #* # to remove HTML from a string #* my ($s) = @_; # a string of text my $rv = 0; if ($s) { my $nohtml = HTML::Restrict->new(); my $processed = $nohtml->process($s); if ($processed ne $s) { $rv = $processed; } else { $rv = $s; } } return $rv; #usage: my $sanitized = sanitize($input); }
perhaps i'm going about "sanitizing" in "get_params" incorrectly?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: problem with Crypt::PBKDF2
by Athanasius (Archbishop) on Sep 16, 2017 at 08:19 UTC | |
by jamroll (Beadle) on Sep 16, 2017 at 18:33 UTC | |
by Athanasius (Archbishop) on Sep 17, 2017 at 06:24 UTC |