The changes load when the file comes near.
Change request saved in this viewer
This review has no pull request, so the decision stays in this viewer.
An agent sees the decision only while it watches this review. If the agent is not answering in chat, ask it there: Continue the mcp-review at /demo
Snapshot #2 of 2
Snapshot #1 → #2: the earlier snapshot's code against the displayed snapshot.
Harden sign-in: hashed passwords, expiring sessions and per-session rate limits
Coverage
- Presentation
- All 143 selected changes are placed. 132 in groups · 0 unbucketed · 4 generated · 7 without a text diff
- Explanations
- 13 of 13 groups have an explanation.
- Agent analysis
- Reading the analysis status…
- Human review
- 7 of 136 hunks are marked reviewed.
Outdated discussions 1
These discussions have no verified location in the displayed changes. Each keeps its original code and stays open to replies and resolution.
OPEN src/auth.ts Outdated · Ln 27 This token is the user name and the time of the request, so anyone who knows roughly when a user refreshed can guess it. Should it be random, like the session I…
The selected new-side lines no longer exist in src/auth.ts.
session.token = `tok-${session.user}-${Date.now()}`;
Core auth changes
Login validates credentials before it issues a token, and the bearer middleware resolves the session for every other route. A refreshed token is random, so nobody can derive it from the user name and the time of the request.
Why it matters
- Empty credentials previously received tokens.
- A token that the clock decides is guessable.
src/auth.tsand the auth middleware also appear in other sections. This section shows only the hunks of this change.
sequenceDiagram
participant C as Client
participant A as auth.login
C->>A: user, password
alt missing
A-->>C: throw
else ok
A-->>C: token
end
The changes load when the file comes near.