]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 85833: show_bug.cgi (and probably others) now allow leading or trailing...
authorjustdave%syndicomm.com <>
Wed, 20 Jun 2001 05:48:21 +0000 (05:48 +0000)
committerjustdave%syndicomm.com <>
Wed, 20 Jun 2001 05:48:21 +0000 (05:48 +0000)
Patch by Jake Steenhagen <jake@acutex.net>
r= justdave@syndicomm.com

CGI.pl

diff --git a/CGI.pl b/CGI.pl
index efcf0c2ac132ee4d664987020fa665ba51f1898c..09ab23c076b441c41ab88ec6a04435eb3de0023f 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -235,7 +235,8 @@ sub ValidateBugID {
     my ($id) = @_;
 
     # Make sure the bug number is a positive integer.
-    $id =~ /^([1-9][0-9]*)$/
+    # Whitespace can be ignored because the SQL server will ignore it.
+    $id =~ /^\s*([1-9][0-9]*)\s*$/
       || DisplayError("The bug number is invalid.") 
       && exit;