Repository navigation
fix(session): follow-ups to the database session driver - #406
Merged
Merged
Conversation
- Record the stored password hash when a password is changed with withoutHook()->update(). The raw value was recorded before, but the model trims and casts it on save, so the device that changed its own password could be signed out by AuthenticateSession. - Add a --uuid option to session:table that generates a string(36) user_id column for apps with UUID or ULID user keys. - Correct the sessions() docblock: the list includes the current device. - Add upgrade notes for the database driver and AuthenticateSession.
techmahedy
requested changes
Nov 12, 2026
techmahedy
left a comment
Member
There was a problem hiding this comment.
Please revert the changelog, this will auto update after releasing, update the docs carefully
Member
Author
|
@techmahedy Thanks for the review. Both points are addressed:
The rest was already covered in the docs (old sessions signed out once, the default-actor limit, Could you take another look? |
techmahedy
approved these changes
Nov 12, 2026
techmahedy
left a comment
Member
There was a problem hiding this comment.
Thanks for addressing the issues. Looks good now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups to #400. Docs: doppar/docs#125.
Changes
Fix: password recorded wrongly by
withoutHook()->update()When hooks are off,
Authable::update()recorded the rawpasswordvalue passed in as the device's pending password.Model::update()stores the value throughsetAttribute(), which trims it (sanitize()) and applies any#[Cast]set-cast. If the two differed, the pending fingerprint didn't match the saved hash, andAuthenticateSessionsigned out the device that had just changed its own password.The value is now normalised the same way
setAttribute()does before it is recorded.session:table --uuidThe generated migration used a big-integer
user_id, which breaks session writes for apps with UUID or ULID user keys on MySQL and PostgreSQL.php pool session:table --uuidnow generatesstring('user_id', 36). The default is unchanged.Docblock
The
Authenticate::sessions()docblock said "other devices", but the list includes the current one (is_current).Tests
test_a_password_updated_without_hooks_is_recorded_as_the_model_stores_it. It fails without the fix.session:tabledefault and--uuidcolumn tests.DatabaseStoreTest::migrate()now fills in the new{{ user_id }}placeholder.