diff options
author | James Lopez <james@jameslopez.es> | 2016-06-30 17:22:56 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-06-30 17:22:56 +0200 |
commit | ef5713546bacc653f598eb692b728e35abdb8ab7 (patch) | |
tree | 740909fad3bf9d51b7192596490a3ff9e8e1a14c | |
parent | 67f59ebd50511bfba1ebdc73b6fd269f425ac6f0 (diff) | |
download | gitlab-ce-ef5713546bacc653f598eb692b728e35abdb8ab7.tar.gz |
few more changes from suggestions
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | app/validators/addressable_url_validator.rb | 1 | ||||
-rw-r--r-- | db/migrate/20160620110927_fix_no_validatable_import_url.rb | 5 | ||||
-rw-r--r-- | lib/gitlab/url_sanitizer.rb | 1 |
4 files changed, 4 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG index 5b12ba589b8..3145178d547 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -25,8 +25,6 @@ v 8.10.0 (unreleased) - Add Bugzilla integration !4930 (iamtjg) - Allow [ci skip] to be in any case and allow [skip ci]. !4785 (simon_w) - Set import_url validation to be more strict - -v 8.9.3 (unreleased) - Add basic system information like memory and disk usage to the admin panel v 8.9.4 (unreleased) diff --git a/app/validators/addressable_url_validator.rb b/app/validators/addressable_url_validator.rb index c97acf7da95..63761c81721 100644 --- a/app/validators/addressable_url_validator.rb +++ b/app/validators/addressable_url_validator.rb @@ -18,7 +18,6 @@ # end # class AddressableUrlValidator < ActiveModel::EachValidator - DEFAULT_OPTIONS = { protocols: %w(http https ssh git) } def validate_each(record, attribute, value) diff --git a/db/migrate/20160620110927_fix_no_validatable_import_url.rb b/db/migrate/20160620110927_fix_no_validatable_import_url.rb index e111691ea3c..3e3837ab7e9 100644 --- a/db/migrate/20160620110927_fix_no_validatable_import_url.rb +++ b/db/migrate/20160620110927_fix_no_validatable_import_url.rb @@ -53,7 +53,10 @@ class FixNoValidatableImportUrl < ActiveRecord::Migration end def up - return unless defined?(Addressable::URI::InvalidURIError) + unless defined?(Addressable::URI::InvalidURIError) + say('Skipping cleaning up invalid import URLs as class from Addressable iss missing') + return + end say('Cleaning up invalid import URLs... This may take a few minutes if we have a large number of imported projects.') diff --git a/lib/gitlab/url_sanitizer.rb b/lib/gitlab/url_sanitizer.rb index 50febfc18f8..86ed18fb50d 100644 --- a/lib/gitlab/url_sanitizer.rb +++ b/lib/gitlab/url_sanitizer.rb @@ -1,6 +1,5 @@ module Gitlab class UrlSanitizer - def self.sanitize(content) regexp = URI::Parser.new.make_regexp(['http', 'https', 'ssh', 'git']) |