summaryrefslogtreecommitdiff
path: root/app/models/hooks/web_hook.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/hooks/web_hook.rb')
-rw-r--r--app/models/hooks/web_hook.rb2
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)