Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-09-28 16:49:37 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-09-28 16:49:37 +0300
commit87328fa978ad9db14cd639f1ab636a0af82fa951 (patch)
treeaebd9d5cd24b59132d9e10712b5c705b63378365 /lib/gitlab/url_sanitizer.rb
parente9060da6f0aee35d1d6b7a9158a102c4b197a965 (diff)
Make sure we didn't blow up if URI is invalid
Diffstat (limited to 'lib/gitlab/url_sanitizer.rb')
-rw-r--r--lib/gitlab/url_sanitizer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/url_sanitizer.rb b/lib/gitlab/url_sanitizer.rb
index 4e1ec1402ea..86a36ce93d3 100644
--- a/lib/gitlab/url_sanitizer.rb
+++ b/lib/gitlab/url_sanitizer.rb
@@ -64,6 +64,8 @@ module Gitlab
url.password = password if password.present?
url.user = user if user.present?
url
+ rescue Addressable::URI::InvalidURIError
+ Addressable::URI.new
end
def generate_full_url