Skip to content

Deprecation warning relevant to Bcrypt on aerospike client #140

@moranza81

Description

@moranza81

I get the following deprecation warning:
[DEPRECATION] Passing the third argument to BCrypt::Engine.hash_secret is deprecated. Please do not pass the third argument which is currently not used.


The solution should be replacing:
BCrypt::Engine.hash_secret(password, salt, cost)
call with
BCrypt::Engine.hash_secret(password, salt)

I'm using Ruby 3.2.8, bcrypt gem latest version: 3.1.20


Attached stack trace:
DEPRECATION WARNING TRACE:
internal:warning:51:in warn' /usr/local/bundle/gems/bcrypt-3.1.20/lib/bcrypt/engine.rb:57:in hash_secret'
/usr/local/bundle/gems/aerospike-4.2.0/lib/aerospike/command/login_command.rb:160:in hash_password' /usr/local/bundle/gems/aerospike-4.2.0/lib/aerospike/cluster.rb:57:in initialize'
/usr/local/bundle/gems/aerospike-4.2.0/lib/aerospike/client.rb:45:in new' /usr/local/bundle/gems/aerospike-4.2.0/lib/aerospike/client.rb:45:in initialize'
/Users/moran.zafir/Workspaces/SafeDK-devenv/SafeDK-DIO-Db/lib/safedk_dio_db/app/models/aero/aerospike_driver.rb:51:in new' /Users/moran.zafir/Workspaces/SafeDK-devenv/SafeDK-DIO-Db/lib/safedk_dio_db/app/models/aero/aerospike_driver.rb:51:in initialize'
/usr/local/lib/ruby/3.2.0/singleton.rb:127:in new' /usr/local/lib/ruby/3.2.0/singleton.rb:127:in block in instance'
/usr/local/lib/ruby/3.2.0/singleton.rb:125:in synchronize' /usr/local/lib/ruby/3.2.0/singleton.rb:125:in instance'
/Users/moran.zafir/Workspaces/SafeDK-devenv/SafeDK-DIO-Db/lib/safedk_dio_db/app/models/aero/aerospike_record_base.rb:77:in all' (pry):1:in pry'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_instance.rb:288:in eval' /usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_instance.rb:288:in evaluate_ruby'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_instance.rb:629:in handle_line' /usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_instance.rb:259:in block (2 levels) in eval'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_instance.rb:258:in catch' /usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_instance.rb:258:in block in eval'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_instance.rb:257:in catch' /usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_instance.rb:257:in eval'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/repl.rb:77:in block in repl' /usr/local/bundle/gems/pry-0.15.2/lib/pry/repl.rb:67:in loop'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/repl.rb:67:in repl' /usr/local/bundle/gems/pry-0.15.2/lib/pry/repl.rb:38:in block in start'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/input_lock.rb:61:in __with_ownership' /usr/local/bundle/gems/pry-0.15.2/lib/pry/input_lock.rb:78:in with_ownership'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/repl.rb:38:in start' /usr/local/bundle/gems/pry-0.15.2/lib/pry/repl.rb:15:in start'
/usr/local/bundle/gems/pry-0.15.2/lib/pry/pry_class.rb:196:in start' /usr/local/bundle/gems/railties-7.0.8.7/lib/rails/commands/console/console_command.rb:74:in start'
/usr/local/bundle/gems/railties-7.0.8.7/lib/rails/commands/console/console_command.rb:19:in start' /usr/local/bundle/gems/railties-7.0.8.7/lib/rails/commands/console/console_command.rb:106:in perform'
/usr/local/bundle/gems/thor-1.3.2/lib/thor/command.rb:28:in run' /usr/local/bundle/gems/thor-1.3.2/lib/thor/invocation.rb:127:in invoke_command'
/usr/local/bundle/gems/thor-1.3.2/lib/thor.rb:538:in dispatch' /usr/local/bundle/gems/railties-7.0.8.7/lib/rails/command/base.rb:87:in perform'
/usr/local/bundle/gems/railties-7.0.8.7/lib/rails/command.rb:48:in invoke' /usr/local/bundle/gems/railties-7.0.8.7/lib/rails/commands.rb:18:in

'
internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require' <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in require'
/usr/local/bundle/gems/bootsnap-1.18.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' bin/rails:4:in '
[DEPRECATION] Passing the third argument to BCrypt::Engine.hash_secret is deprecated. Please do not pass the third argument which is currently not used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions