From: justdave%syndicomm.com <> Date: Wed, 20 Jun 2001 05:48:21 +0000 (+0000) Subject: Fix for bug 85833: show_bug.cgi (and probably others) now allow leading or trailing... X-Git-Tag: bugzilla-2.14~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28bb0400e48527d4877ab2a6905a2ab68b08931e;p=thirdparty%2Fbugzilla.git Fix for bug 85833: show_bug.cgi (and probably others) now allow leading or trailing spaces in the bug id, to allow for user input error. This used to work, and recent bug validation changes broke it. Patch by Jake Steenhagen r= justdave@syndicomm.com --- diff --git a/CGI.pl b/CGI.pl index efcf0c2ac1..09ab23c076 100644 --- 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;