diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-01 03:07:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-01 03:07:13 +0300 |
commit | ba557e8fea7c8a825a702ab154fa1574c4d2998a (patch) | |
tree | 9c252889816492ea0ebc5c7f86b1f5cd4a2f3620 /app/models/integrations | |
parent | d88cacce3f205151867ab3f9297f10cdae4a7025 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/integrations')
-rw-r--r-- | app/models/integrations/jira.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/integrations/jira.rb b/app/models/integrations/jira.rb index 30497c0110e..65492bfd9c2 100644 --- a/app/models/integrations/jira.rb +++ b/app/models/integrations/jira.rb @@ -97,7 +97,10 @@ module Integrations def self.valid_jira_cloud_url?(url) return false unless url.present? - !!URI(url).hostname&.end_with?(JIRA_CLOUD_HOST) + uri = URI.parse(url) + uri.is_a?(URI::HTTPS) && !!uri.hostname&.end_with?(JIRA_CLOUD_HOST) + rescue URI::InvalidURIError + false end def data_fields |