From 324aca0fad234f210132c76662fe4566b2100a71 Mon Sep 17 00:00:00 2001 From: rohitsden Date: Fri, 12 Jan 2018 19:36:51 -0500 Subject: [PATCH 1/2] Fix HipChat WebHook URL validation. --- lib/discourse_chat/provider/hipchat/hipchat_provider.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/discourse_chat/provider/hipchat/hipchat_provider.rb b/lib/discourse_chat/provider/hipchat/hipchat_provider.rb index 890b39a..8424e6e 100644 --- a/lib/discourse_chat/provider/hipchat/hipchat_provider.rb +++ b/lib/discourse_chat/provider/hipchat/hipchat_provider.rb @@ -5,7 +5,7 @@ module DiscourseChat PROVIDER_ENABLED_SETTING = :chat_integration_hipchat_enabled CHANNEL_PARAMETERS = [ { key: "name", regex: '^\S+' }, - { key: "webhook_url", regex: 'hipchat\.com', unique: true, hidden: true }, + { key: "webhook_url", regex: 'hipchat\.', unique: true, hidden: true }, { key: "color", regex: '^(yellow|green|red|purple|gray|random)$' } ] From 79288fc2542a39719e168735b8c031bd06c5a720 Mon Sep 17 00:00:00 2001 From: rohitsden Date: Sat, 13 Jan 2018 21:58:40 -0500 Subject: [PATCH 2/2] Update HipChat WebHook URL validation to check for anything that isn't space. --- lib/discourse_chat/provider/hipchat/hipchat_provider.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/discourse_chat/provider/hipchat/hipchat_provider.rb b/lib/discourse_chat/provider/hipchat/hipchat_provider.rb index 8424e6e..e778473 100644 --- a/lib/discourse_chat/provider/hipchat/hipchat_provider.rb +++ b/lib/discourse_chat/provider/hipchat/hipchat_provider.rb @@ -5,7 +5,7 @@ module DiscourseChat PROVIDER_ENABLED_SETTING = :chat_integration_hipchat_enabled CHANNEL_PARAMETERS = [ { key: "name", regex: '^\S+' }, - { key: "webhook_url", regex: 'hipchat\.', unique: true, hidden: true }, + { key: "webhook_url", regex: '^\S+$', unique: true, hidden: true }, { key: "color", regex: '^(yellow|green|red|purple|gray|random)$' } ]