summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjustdave%syndicomm.com <>2001-06-20 07:48:21 +0200
committerjustdave%syndicomm.com <>2001-06-20 07:48:21 +0200
commit28bb0400e48527d4877ab2a6905a2ab68b08931e (patch)
treea661537889a676fcc2390114160eee8a66af7ef5
parent1438d64a16dfa9f2ee7ab84110c2c5662fb7a19d (diff)
downloadbugzilla-28bb0400e48527d4877ab2a6905a2ab68b08931e.tar.gz
bugzilla-28bb0400e48527d4877ab2a6905a2ab68b08931e.tar.xz
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 <jake@acutex.net> r= justdave@syndicomm.com
-rw-r--r--CGI.pl3
1 files changed, 2 insertions, 1 deletions
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;