aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-06-17 02:00:58 +0000
committerlpsolit%gmail.com <>2005-06-17 02:00:58 +0000
commitde027530e15fc988f94411784abf368971ff8155 (patch)
tree5de85158bcedc526f9753c5b8e5473c9d2c83dfe
parent1fde21205d29e4fb435649ff7e8323af7d4cd1de (diff)
downloadbugs-de027530e15fc988f94411784abf368971ff8155.tar
bugs-de027530e15fc988f94411784abf368971ff8155.tar.gz
bugs-de027530e15fc988f94411784abf368971ff8155.tar.bz2
bugs-de027530e15fc988f94411784abf368971ff8155.tar.xz
bugs-de027530e15fc988f94411784abf368971ff8155.zip
Bug 297928: detaint_natural, detaint_signed and trick_taint shouldn't rely on $1 - Patch by Christian Reis <kiko@async.com.br> r/a = justdave
-rw-r--r--Bugzilla/Util.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 4dc64fe94..91e66f9f8 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -59,20 +59,20 @@ sub is_tainted {
sub trick_taint {
require Carp;
Carp::confess("Undef to trick_taint") unless defined $_[0];
- $_[0] =~ /^(.*)$/s;
- $_[0] = $1;
+ my ($match) = $_[0] =~ /^(.*)$/s;
+ $_[0] = $match;
return (defined($_[0]));
}
sub detaint_natural {
- $_[0] =~ /^(\d+)$/;
- $_[0] = $1;
+ my ($match) = $_[0] =~ /^(\d+)$/;
+ $_[0] = $match;
return (defined($_[0]));
}
sub detaint_signed {
- $_[0] =~ /^([-+]?\d+)$/;
- $_[0] = $1;
+ my ($match) = $_[0] =~ /^([-+]?\d+)$/;
+ $_[0] = $match;
# Remove any leading plus sign.
if (defined($_[0]) && $_[0] =~ /^\+(\d+)$/) {
$_[0] = $1;