From 28bb0400e48527d4877ab2a6905a2ab68b08931e Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" <> Date: Wed, 20 Jun 2001 05:48:21 +0000 Subject: 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 --- CGI.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CGI.pl') diff --git a/CGI.pl b/CGI.pl index efcf0c2ac..09ab23c07 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; -- cgit v1.2.3-24-g4f1b