summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/CGI.pl b/CGI.pl
index 8e8da5871..4eeeaf5d2 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -276,8 +276,9 @@ sub ValidateBugID {
$id = trim($id);
# If the ID isn't a number, it might be an alias, so try to convert it.
- if ($id !~ /^[1-9][0-9]*$/) {
- $id = BugAliasToID($id);
+ my $alias = $id;
+ if (!detaint_natural($id)) {
+ $id = BugAliasToID($alias);
if (!$id) {
my $html_id = html_quote($_[0]);
my $alias_specific_message = Param("usebugaliases") ?