From 4fa2b61f13eab3019a0b9e6c25e9becc592d77c1 Mon Sep 17 00:00:00 2001 From: Lucy Fu Date: Mon, 16 Sep 2019 17:23:02 -0400 Subject: [PATCH] Clean up the password value in logs. https://bugzilla.redhat.com/show_bug.cgi?id=1752033 --- lib/miq_automation_engine/engine/miq_ae_engine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/miq_automation_engine/engine/miq_ae_engine.rb b/lib/miq_automation_engine/engine/miq_ae_engine.rb index 25c3f2be6..b245274cd 100644 --- a/lib/miq_automation_engine/engine/miq_ae_engine.rb +++ b/lib/miq_automation_engine/engine/miq_ae_engine.rb @@ -114,7 +114,7 @@ def self.deliver(*args) else if ae_result.casecmp('error').zero? miq_task&.update_message(MiqTask::MESSAGE_TASK_COMPLETED_UNSUCCESSFULLY) - message = "Error delivering #{options[:attrs].inspect} for object [#{object_name}] with state [#{state}] to Automate: #{ws.root['ae_message']}" + message = "Error delivering #{ManageIQ::Password.sanitize_string(options[:attrs].inspect)} for object [#{object_name}] with state [#{state}] to Automate: #{ws.root['ae_message']}" _log.error(message) end MiqAeEvent.process_result(ae_result, automate_attrs) if options[:instance_name].to_s.casecmp('EVENT').zero? @@ -123,7 +123,7 @@ def self.deliver(*args) return_result(ws, options[:attrs]) rescue MiqAeException::Error => err - message = "Error delivering #{automate_attrs.inspect} for object [#{object_name}] with state [#{state}] to Automate: #{err.message}" + message = "Error delivering #{ManageIQ::Password.sanitize_string(automate_attrs.inspect)} for object [#{object_name}] with state [#{state}] to Automate: #{err.message}" miq_task&.error(MiqTask::MESSAGE_TASK_COMPLETED_UNSUCCESSFULLY) _log.error(message) ensure