Skip to content

Conversation

biinari
Copy link

@biinari biinari commented Apr 7, 2021

When upgrading sessions using secure! directly or using the rake task
db:sessions:upgrade, it would log entries like:

  ActiveRecord::SessionStore::Session Load (3.1ms)  SELECT  "sessions".* FROM "s
essions" ORDER BY "sessions"."id" ASC LIMIT 1000
  ActiveRecord::SessionStore::Session Update (1.9ms)  UPDATE "sessions" SET "ses
sion_id" = '2::[some_session_id]'
 WHERE "sessions"."id" = 2

Silence logger for these operations to prevent logging session ids.

biinari added 2 commits April 7, 2021 04:24
Prevent logging of the SQL UPDATE statement when upgrading an old session to
use the new session_id format
Prevent logging SQL statements in session id upgrade task db:sessions:upgrade

Reenable rake tasks in setup to allow them to run multiple times in separate
tests.
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

Successfully merging this pull request may close these issues.

1 participant