mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 04:36:11 +10:00
refactor url validator to use sanitizer for check
This commit is contained in:
@@ -35,9 +35,7 @@ class AddressableUrlValidator < ActiveModel::EachValidator
|
||||
end
|
||||
|
||||
def valid_uri?(value)
|
||||
Addressable::URI.parse(value).is_a?(Addressable::URI)
|
||||
rescue Addressable::URI::InvalidURIError
|
||||
false
|
||||
Gitlab::UrlSanitizer.valid?(value)
|
||||
end
|
||||
|
||||
def valid_protocol?(value)
|
||||
|
||||
Reference in New Issue
Block a user