Commit e817ff0
committed
fix: keep the sign-out watermark monotonic and drop the session foreign key
Backing the watermark off by 26 hours to stay clear of time-zone skew also moved
it backwards, which would re-validate tokens somebody had deliberately
invalidated in that window by changing or resetting their password. It now takes
the later of the two values, so it can only ever move forward.
The foreign key on user_session.user_account_id is gone. Hibernate cannot see it
- the column is plain by design, because the row is written by native upserts on
the auth hot path - so the migration check kept generating a changeset to drop
it. It also turned emitting a token into something that requires the account row
to be visible to the current transaction, which broke
TranslationsControllerHistoryTest. Orphans age out with the purge, the same way
activity_revision.author_id is handled.1 parent 37fa414 commit e817ff0
2 files changed
Lines changed: 5 additions & 8 deletions
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5883 | 5883 | | |
5884 | 5884 | | |
5885 | 5885 | | |
5886 | | - | |
5887 | | - | |
5888 | | - | |
5889 | | - | |
5890 | | - | |
5891 | | - | |
5892 | 5886 | | |
5893 | 5887 | | |
5894 | 5888 | | |
| |||
5941 | 5935 | | |
5942 | 5936 | | |
5943 | 5937 | | |
5944 | | - | |
| 5938 | + | |
5945 | 5939 | | |
5946 | 5940 | | |
5947 | 5941 | | |
| |||
0 commit comments