diff options
| author | Adam Soltys <[email protected]> | 2026-08-28 11:11:32 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-28 11:11:32 -0700 |
| commit | a7fc7959eeb58fa7230c7e0869012f03ad2b23b7 (patch) | |
| tree | 1a10473f87903e792c10f48f43c5fe0c3dcc42e4 /lib/api.js.map | |
| parent | 0080e6231cd5f23dfb9260e1a846153b01904903 (diff) | |
| download | coinos-server-a7fc7959eeb58fa7230c7e0869012f03ad2b23b7.tar.gz coinos-server-a7fc7959eeb58fa7230c7e0869012f03ad2b23b7.zip | |
fund: authenticated recovery of a rotated fund's old link
When a fund's secret id has been rotated (invalidating an exfiltrated id list),
its old id 404s. Let a legit owner who bookmarked the old link find the fund
again — but reveal the new id ONLY to an authenticated manager of the new fund,
via a `fund:rotated:<oldid>` -> newid map. An anonymous caller or a non-owner
gets the same "fund not found" as before, so an attacker replaying a leaked old
id learns nothing (an open old->new redirect would defeat the rotation). The
/fund/:id route now runs `optional` auth so req.user is available without
requiring it; bearer funds with no managers are intentionally not recoverable
this way. rotate-funds.ts records the mapping on any future rotation.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DKkev76U4YRnRAqM6jqbae
Diffstat (limited to 'lib/api.js.map')
0 files changed, 0 insertions, 0 deletions
