Fix for bug 85833: show_bug.cgi (and probably others) now allow leading or…

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
parent 1438d64a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment