Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Modules
-
Needs Assessment
Description
The pw_hash function only accepts strings as inputs. This means that if you are using the Sensitive data type for passing passwords around (e.g. from hiera-eyaml), they need to be unwrapped before passing to pw_hash.
This code:
$password = Sensitive.new('hunter2')
|
$salt = Sensitive.new('wubbalubbadubdub')
|
pw_hash($password,'SHA-512',$salt)
|
Gives me this error:
Error: Evaluation Error: Error while evaluating a Function Call, pw_hash(): first argument must be a string at /home/centos/test.pp:3:1 on node master.prod.puppet.com
|
I would expect that it should just workâ˘