We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7181e4e + 7d7e905 commit 20669e3Copy full SHA for 20669e3
1 file changed
lib/puppet/parser/functions/pw_hash.rb
@@ -38,6 +38,8 @@
38
password = args[0]
39
return nil if password.nil? or password.empty?
40
41
+ salt = "$#{hash_type}$#{args[2]}"
42
+
43
# handle weak implementations of String#crypt
44
if 'test'.crypt('$1$1') != '$1$1$Bp8CU9Oujr9SSEw53WV6G.'
45
# JRuby < 1.7.17
@@ -49,6 +51,6 @@
49
51
raise Puppet::ParseError, 'system does not support enhanced salts'
50
52
end
53
else
- password.crypt("$#{hash_type}$#{args[2]}")
54
+ password.crypt(salt)
55
56
0 commit comments