An unofficial, mostly Bitwarden-compatible API server written in Ruby (Sinatra and ActiveRecord)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Change users.kdf_iterations to not nullable

The upstream clients may crash if this value is returned as null

Issue #100

+16
+16
db/migrate/20190724163354_no_null_kdf_iterations.rb
··· 1 + class NoNullKdfIterations < ActiveRecord::Migration[5.1] 2 + def change 3 + User.all.each do |u| 4 + if !u.kdf_iterations 5 + u.kdf_iterations = Bitwarden::KDF::DEFAULT_ITERATIONS[User::DEFAULT_KDF_TYPE] 6 + end 7 + if !u.kdf_type 8 + u.kdf_type = User::DEFAULT_KDF_TYPE 9 + end 10 + u.save! 11 + end 12 + 13 + change_column :users, :kdf_iterations, :integer, :null => false, 14 + :default => Bitwarden::KDF::DEFAULT_ITERATIONS[User::DEFAULT_KDF_TYPE] 15 + end 16 + end