Skip to content

Commit

Permalink
Merge pull request #371 from lfu/clean_up_message_1752033
Browse files Browse the repository at this point in the history
Mask the password value in logs.
  • Loading branch information
gmcculloug authored Sep 18, 2019
2 parents 972e6ef + 4fa2b61 commit 4be2d0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/miq_automation_engine/engine/miq_ae_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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
Expand Down

0 comments on commit 4be2d0a

Please sign in to comment.