From: Aidan Cornelius-Bell Date: Sun, 12 Jan 2025 05:50:51 +0000 (+1030) Subject: Reset encryption: cleaning up after making source available (nothing leaked, just... X-Git-Url: https://gitweb.mndrdr.org/?a=commitdiff_plain;h=55713c498cae45ecfa6ad0c5be74df6a6ac863b0;p=arelpe.git Reset encryption: cleaning up after making source available (nothing leaked, just being safe) --- diff --git a/db/migrate/20250112054949_reset_encrypted_passwords.rb b/db/migrate/20250112054949_reset_encrypted_passwords.rb new file mode 100644 index 0000000..c412fe4 --- /dev/null +++ b/db/migrate/20250112054949_reset_encrypted_passwords.rb @@ -0,0 +1,9 @@ +class ResetEncryptedPasswords < ActiveRecord::Migration[8.0] + def up + # Create a temporary encrypted password - it won't be usable for login + temp_password = "RESET_REQUIRED_#{SecureRandom.hex(10)}" + User.find_each do |user| + user.update_column(:encrypted_password, temp_password) + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 413bad7..88661c2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.2].define(version: 2025_01_10_225508) do +ActiveRecord::Schema[8.0].define(version: 2025_01_12_054949) do create_table "api_keys", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.string "key" t.datetime "created_at", null: false