Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

Make redact_sensitive more versatile #1810

Merged
merged 1 commit into from Feb 6, 2018
Merged

Make redact_sensitive more versatile #1810

merged 1 commit into from Feb 6, 2018

Conversation

amdprophet
Copy link
Member

Description

This PR fixes #1804 by making redact_sensitive accept any object for the first parameter. If the object is a Hash or Array, it can recurse through to make sure any sensitive keys are redacted.

Related Issue

Fixes #1804

Motivation and Context

See #1804

How Has This Been Tested?

Wrote a new test to cover hashes nested within an array which is nested within another array. Utility tests failed with code currently on master - tests pass with code in this PR.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
Copy link
Contributor

@cwjohnston cwjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@cwjohnston cwjohnston merged commit 44dc426 into master Feb 6, 2018
@cwjohnston cwjohnston deleted the redact-fixes branch February 6, 2018 23:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visible password at sensu-client logs after restart
2 participants