Skip to content

Commit d6ae444

Browse files
authored
Merge pull request #1410 from TuningYourCode/main
(#1389) - pw_hash with bcrypt not working on puppet master
2 parents ed474d2 + 37de718 commit d6ae444

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/puppet/parser/functions/pw_hash.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
# handle weak implementations of String#crypt
7878
# dup the string to get rid of frozen status for testing
79-
if RUBY_PLATFORM == 'java'
79+
if RUBY_PLATFORM == 'java' && !args[1].downcase.start_with?('bcrypt')
8080
# puppetserver bundles Apache Commons Codec
8181
org.apache.commons.codec.digest.Crypt.crypt(password.to_java_bytes, salt)
8282
elsif (+'test').crypt('$1$1') == '$1$1$Bp8CU9Oujr9SSEw53WV6G.'

0 commit comments

Comments
 (0)