Skip to content

Commit 37de718

Browse files
TuningYourCodebastelfreak
authored andcommitted
Fix #1389 - pw_hash with bcrypt not working on puppet master
1 parent ed474d2 commit 37de718

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)