Skip to content

pw_hash is not working with bcrypt-y #1453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Albroy opened this issue May 7, 2025 · 0 comments
Open

pw_hash is not working with bcrypt-y #1453

Albroy opened this issue May 7, 2025 · 0 comments

Comments

@Albroy
Copy link

Albroy commented May 7, 2025

Describe the Bug

Using the pw_hash() function with the 'bcrypt-y' algorithm inside an ini_setting resource causes a catalog compilation failure with an "Invalid argument" error when using Puppet stdlib version 9.7.0.

In stdlib 9.7.0, when I try to do this :

  ini_setting { 'my_thing.PASSWORD_HASH':
    ensure  => present,
    setting => 'my_thing.PASSWORD_HASH',
    value   => pw_hash($password, 'bcrypt-y','10$abcdefghijklmnopqrstuv),
    path    => $my_path,
  }

I get the following error :

Info: Loading facts
Notice: Requesting catalog from X
Notice: Catalog compiled by X
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Invalid argument - Invalid argument (file: /etc/puppetlabs/code/environments/X/site/profiles/manifests/my_thing.pp, line: 229, column: 16) on node X
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Environment

  • stdlib version : 9.7.0
  • puppet agent version : 7.34.0
  • puppet server version : 7.17.3
  • OS : Debian 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant