]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1599539 - Bugzilla should strip whitespace from the beginning of the URL field
authordklawren <dklawren@users.noreply.github.com>
Mon, 9 Dec 2019 15:54:33 +0000 (10:54 -0500)
committerGitHub <noreply@github.com>
Mon, 9 Dec 2019 15:54:33 +0000 (10:54 -0500)
Bugzilla/Bug.pm

index 8dd4758aa6ddd0527f9f75c779f20b1ec1d5d204..7ef1ded76c82782e15bf5b2ffc8516344fa3b8b5 100644 (file)
@@ -1762,7 +1762,8 @@ sub _check_assigned_to {
 
 sub _check_bug_file_loc {
   my ($invocant, $url) = @_;
-  $url = '' if !defined($url);
+  return '' if !defined $url;
+  $url = trim($url);
 
   # On bug entry, if bug_file_loc is "http://", the default, use an
   # empty value instead. However, on bug editing people can set that