diff options
| author | Adam Soltys <[email protected]> | 2026-11-02 13:06:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-11-02 13:06:47 -0700 |
| commit | e3ab990961397ba821faaf3cee7d872175f77ffa (patch) | |
| tree | db126ff41f9242709063ff7c7d9e1398a158338e /lib/changeid.ts | |
| parent | 5a58f1c876b08fa0b34fb9b9bb928db5ec30c84b (diff) | |
| download | coinos-server-e3ab990961397ba821faaf3cee7d872175f77ffa.tar.gz coinos-server-e3ab990961397ba821faaf3cee7d872175f77ffa.zip | |
changeid: keep a frozen or evicted account frozen under its new id
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VMan6VN9xvnX1cgvV6hrUV
Diffstat (limited to 'lib/changeid.ts')
| -rw-r--r-- | lib/changeid.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/changeid.ts b/lib/changeid.ts index 1c6a6688..d4eca441 100644 --- a/lib/changeid.ts +++ b/lib/changeid.ts @@ -116,6 +116,11 @@ export default async function changeid(un: string) { } catch (e) {} } + // Freezes and evictions are keyed by uid, so carry them to the new id or a + // rekey (which the blocked-address check triggers on its own) lifts them. + for (const set of ["blacklist", "evicted"]) + if (await db.sIsMember(set, id)) await db.sAdd(set, nid); + l(`SECURITY: rekeyed ${un} from ${id} to ${nid}`); return nid; } |
