summaryrefslogtreecommitdiff
path: root/lib/chef/http/authenticator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/http/authenticator.rb')
-rw-r--r--lib/chef/http/authenticator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http/authenticator.rb b/lib/chef/http/authenticator.rb
index 3b9d49f42a..98d331d4f0 100644
--- a/lib/chef/http/authenticator.rb
+++ b/lib/chef/http/authenticator.rb
@@ -191,7 +191,7 @@ class Chef
@win32registry.create_key(new_path, true)
end
size = 14
- password = SOME_CHARS.sample(size).join
+ password = (0...size).map { SOME_CHARS.sample(1) }.join
encrypted_pass = encrypt_pfx_pass(password)
values = { name: "PfxPass", type: :string, data: encrypted_pass }
@win32registry.set_value(new_path, values)