diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-11 11:38:14 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-11 11:38:14 +0200 |
commit | 9e52a2dcaba58f6bf4ce7c9858951e1936d73740 (patch) | |
tree | 4450e157a83dd6ed17ef36d4dd88afc16d4cac30 /app/models/hooks | |
parent | cebb74a0c0575f00f8904b204559979486fc714f (diff) | |
download | gitlab-ce-9e52a2dcaba58f6bf4ce7c9858951e1936d73740.tar.gz |
Don't use URI.regexp to validate since it doens't have start/end anchors.
Diffstat (limited to 'app/models/hooks')
-rw-r--r-- | app/models/hooks/web_hook.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb index defef7216f2..315d96af1b9 100644 --- a/app/models/hooks/web_hook.rb +++ b/app/models/hooks/web_hook.rb @@ -28,7 +28,7 @@ class WebHook < ActiveRecord::Base default_timeout Gitlab.config.gitlab.webhook_timeout validates :url, presence: true, - format: { with: URI::regexp(%w(http https)), message: "should be a valid url" } + format: { with: /\A#{URI.regexp(%w(http https))}\z/, message: "should be a valid url" } def execute(data) parsed_url = URI.parse(url) |