Strip whitespace from webhook URL's

Strip whitespace from webhook URL's
This commit is contained in:
Jorge Manrubia
2026-03-03 10:06:31 +01:00
committed by GitHub
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -36,6 +36,7 @@ class Webhook < ApplicationRecord
after_create :create_delinquency_tracker!
normalizes :subscribed_actions, with: ->(value) { Array.wrap(value).map(&:to_s).uniq & PERMITTED_ACTIONS }
normalizes :url, with: -> { it.strip }
validates :name, presence: true
validate :validate_url