]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
SECURITY FIX for bug 117614; Undefined subroutine &main::detaint_natural called at...
authordkl%redhat.com <>
Thu, 3 Jan 2002 14:15:55 +0000 (14:15 +0000)
committerdkl%redhat.com <>
Thu, 3 Jan 2002 14:15:55 +0000 (14:15 +0000)
globals.pl

index 91bed7794c8d9e1352966a8c4a95bcd240ca47e9..cfb03252497888889fc9ff67f9b2eb99cd1eced8 100644 (file)
@@ -20,6 +20,7 @@
 # Contributor(s): Terry Weissman <terry@mozilla.org>
 #                 Dan Mosedale <dmose@mozilla.org>
 #                 Jake <jake@acutex.net>
+#                 Bradley Baetz <bbaetz@cs.mcgill.ca>
 
 # Contains some global variables and routines used throughout bugzilla.
 
@@ -835,6 +836,12 @@ sub detaint_string {
     $str = $1;
 }
 
+sub detaint_natural {
+    $_[0] =~ /^(\d+)$/;
+    $_[0] = $1;
+    return (defined($_[0]));
+}
+
 # This routine quoteUrls contains inspirations from the HTML::FromText CPAN
 # module by Gareth Rees <garethr@cre.canon.co.uk>.  It has been heavily hacked,
 # all that is really recognizable from the original is bits of the regular