]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 297928: detaint_natural and trick_taint shouldn't rely on $1 - Original patch...
authorlpsolit%gmail.com <>
Fri, 17 Jun 2005 02:07:57 +0000 (02:07 +0000)
committerlpsolit%gmail.com <>
Fri, 17 Jun 2005 02:07:57 +0000 (02:07 +0000)
globals.pl

index f19b52c723b32d73dfe6c24c877823c77ae5383c..fc3764e5616a9c5084c78b8b0f87805306ebf876 100644 (file)
@@ -1016,14 +1016,14 @@ sub DBNameToIdAndCheck {
 #           used on variables that cannot be touched by users.
 
 sub trick_taint {
-    $_[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]));
 }