summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;