diff options
| author | lpsolit%gmail.com <> | 2009-01-24 14:12:05 +0000 |
|---|---|---|
| committer | lpsolit%gmail.com <> | 2009-01-24 14:12:05 +0000 |
| commit | 812ad9b3515aff6d9d870c2a11845b7416e40288 (patch) | |
| tree | e99bc10c02db1932a79ca03ce8d4d61018cb32ca /Bugzilla/Install | |
| parent | bf475be80980e0689bac5afc3246523be8f56d93 (diff) | |
| download | bugs-812ad9b3515aff6d9d870c2a11845b7416e40288.tar bugs-812ad9b3515aff6d9d870c2a11845b7416e40288.tar.gz bugs-812ad9b3515aff6d9d870c2a11845b7416e40288.tar.bz2 bugs-812ad9b3515aff6d9d870c2a11845b7416e40288.tar.xz bugs-812ad9b3515aff6d9d870c2a11845b7416e40288.zip | |
Bug 471613: Replace Bugzilla::Util::is_tainted() by Scalar::Util::tainted() - Patch by Nitish Bezzala <nbezzala@yahoo.com> r/a=LpSolit
Diffstat (limited to 'Bugzilla/Install')
| -rw-r--r-- | Bugzilla/Install/Util.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm index 9cec8c435..250ab9157 100644 --- a/Bugzilla/Install/Util.pm +++ b/Bugzilla/Install/Util.pm @@ -31,6 +31,7 @@ use Bugzilla::Constants; use File::Basename; use POSIX qw(setlocale LC_CTYPE); use Safe; +use Scalar::Util qw(tainted); use base qw(Exporter); our @EXPORT_OK = qw( @@ -109,7 +110,7 @@ sub install_string { foreach my $key (@replace_keys) { my $replacement = $vars->{$key}; die "'$key' in '$string_id' is tainted: '$replacement'" - if is_tainted($replacement); + if tainted($replacement); # We don't want people to start getting clever and inserting # ##variable## into their values. So we check if any other # key is listed in the *replacement* string, before doing @@ -354,10 +355,6 @@ sub trick_taint { return (defined($_[0])); } -sub is_tainted { - return not eval { my $foo = join('',@_), kill 0; 1; }; -} - __END__ =head1 NAME |
