Skip to content

Commit 9327271

Browse files
committed
feat(webhooks): don't use username if empty string
1 parent c8a8194 commit 9327271

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pact_broker/domain/webhook_request.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def http_request
122122
@http_request ||= begin
123123
req = Net::HTTP.const_get(method.capitalize).new(url)
124124
headers.each_pair { | name, value | req[name] = value }
125-
req.basic_auth(username, password) if username
125+
req.basic_auth(username, password) if username && username.size > 0
126126
req.body = body unless body.nil?
127127
req
128128
end

0 commit comments

Comments
 (0)