From: Dylan William Hardison Date: Thu, 8 Nov 2018 15:17:37 +0000 (-0500) Subject: Bug 1436619 - followup: ignore "http://" in URL field X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=078ade47fdda30bc0b430cb1adf8dd198b515b09;p=thirdparty%2Fbugzilla.git Bug 1436619 - followup: ignore "http://" in URL field --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 2cebacbb8..ee48ed7a2 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1678,8 +1678,12 @@ sub _check_assigned_to { sub _check_bug_file_loc { my ($invocant, $url) = @_; $url = '' if !defined($url); - # TODO: Add validation. It has to be loose, since we have accepted `data:`, - # `javascript:` and any other values on the URL field. + # On bug entry, if bug_file_loc is "http://", the default, use an + # empty value instead. However, on bug editing people can set that + # back if they *really* want to. + if (!ref $invocant && $url eq 'http://') { + $url = ''; + } return $url; }