From 078ade47fdda30bc0b430cb1adf8dd198b515b09 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 8 Nov 2018 10:17:37 -0500 Subject: [PATCH] Bug 1436619 - followup: ignore "http://" in URL field --- Bugzilla/Bug.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.47.3