Skip to content

(MODULES-5546) add check for pw_hash#810

Merged
hunner merged 1 commit intopuppetlabs:masterfrom
eputnam:pw_hash_fix
Aug 31, 2017
Merged

(MODULES-5546) add check for pw_hash#810
hunner merged 1 commit intopuppetlabs:masterfrom
eputnam:pw_hash_fix

Conversation

@eputnam
Copy link
Copy Markdown
Contributor

@eputnam eputnam commented Aug 28, 2017

Older versions of Puppet end up choking on the sensitive data type check in the pw_hash function added in 42d4ea7. this adds a check for the Sensitive class and then the type of the arg, so that if the class has not been declared, it will just move on.

Copy link
Copy Markdown
Contributor

@glennsarti glennsarti left a comment

Choose a reason for hiding this comment

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

Just a thought, if the issue is that the class doesn't exist, perhaps instead of using a 'magic' version number, should you instead check if the class exists first?

or perhaps check if the object responds_to? unwrap ?

@eputnam
Copy link
Copy Markdown
Contributor Author

eputnam commented Aug 28, 2017

yeah i like that better.

Older versions of Puppet end up choking on the sensitive data type check in the pw_hash function added in 42d4ea7. this adds a check for the Sensitive class and then the type of the arg, so that if the class has not been declared, it will just move on.
@eputnam eputnam changed the title (MODULES-5546) add version check for pw_hash (MODULES-5546) add check for pw_hash Aug 28, 2017
Copy link
Copy Markdown
Contributor

@glennsarti glennsarti left a comment

Choose a reason for hiding this comment

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

A thing of beauty!

@hunner hunner merged commit b1071e4 into puppetlabs:master Aug 31, 2017
hunner added a commit that referenced this pull request Aug 31, 2017
(MODULES-5546) add check for pw_hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants