From b55a597378b4c643d0cf0f21910dcf97adfd3076 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Mon, 21 Dec 2015 12:31:35 +0100 Subject: remove HTTP Basic Authentication credentials passed in URL in error messages --- lib/rest-client-wrapper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rest-client-wrapper.rb b/lib/rest-client-wrapper.rb index 7011eca..f4febb5 100644 --- a/lib/rest-client-wrapper.rb +++ b/lib/rest-client-wrapper.rb @@ -71,6 +71,7 @@ module OpenTox cause = content[RDF::OT.errorCause].to_s raise if msg.size==0 && cause.size==0 # parsing failed rescue # parsing error failed, use complete content as message + uri = uri.gsub(/(http|https)\:\/\/[a-zA-Z0-9\-]+\:[a-zA-Z0-9]+\@/, "***@") msg = "Could not parse error response from rest call '#{method}' to '#{uri}':\n#{response}" cause = nil end -- cgit v1.2.3