few more changes from suggestions
This commit is contained in:
		
							parent
							
								
									67f59ebd50
								
							
						
					
					
						commit
						ef5713546b
					
				|  | @ -25,8 +25,6 @@ v 8.10.0 (unreleased) | ||||||
|   - Add Bugzilla integration !4930 (iamtjg) |   - Add Bugzilla integration !4930 (iamtjg) | ||||||
|   - Allow [ci skip] to be in any case and allow [skip ci]. !4785 (simon_w) |   - Allow [ci skip] to be in any case and allow [skip ci]. !4785 (simon_w) | ||||||
|   - Set import_url validation to be more strict |   - 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 |   - Add basic system information like memory and disk usage to the admin panel | ||||||
| 
 | 
 | ||||||
| v 8.9.4 (unreleased) | v 8.9.4 (unreleased) | ||||||
|  |  | ||||||
|  | @ -18,7 +18,6 @@ | ||||||
| #   end | #   end | ||||||
| # | # | ||||||
| class AddressableUrlValidator < ActiveModel::EachValidator | class AddressableUrlValidator < ActiveModel::EachValidator | ||||||
| 
 |  | ||||||
|   DEFAULT_OPTIONS = { protocols: %w(http https ssh git) } |   DEFAULT_OPTIONS = { protocols: %w(http https ssh git) } | ||||||
| 
 | 
 | ||||||
|   def validate_each(record, attribute, value) |   def validate_each(record, attribute, value) | ||||||
|  |  | ||||||
|  | @ -53,7 +53,10 @@ class FixNoValidatableImportUrl < ActiveRecord::Migration | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   def up |   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.') |     say('Cleaning up invalid import URLs... This may take a few minutes if we have a large number of imported projects.') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,6 +1,5 @@ | ||||||
| module Gitlab | module Gitlab | ||||||
|   class UrlSanitizer |   class UrlSanitizer | ||||||
| 
 |  | ||||||
|     def self.sanitize(content) |     def self.sanitize(content) | ||||||
|       regexp = URI::Parser.new.make_regexp(['http', 'https', 'ssh', 'git']) |       regexp = URI::Parser.new.make_regexp(['http', 'https', 'ssh', 'git']) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue