Repository navigation
feat: warn on /account.html when password is still default - #18
Merged
Merged
Conversation
On page load, /account.html now probes JSS's PUT /idp/credentials
with {currentPassword:"me", newPassword:"me"} via session.authFetch.
- 204 (current matches) → red warning banner above the password
form: "You're using the default password. Change it below to
claim your pod."
- 401 (current doesn't match) → no banner.
The probe is server-side truth (no localStorage state to go stale
across browsers). Side effect is a bcrypt re-hash of the same value
when the password is still default — rate-limited 10/min per IP by
JSS, no functional change.
After a successful password update, the warning is hidden
synchronously (no reload needed). On subsequent loads the probe
sees 401 and the warning stays gone.
Refs #1 #6
This was referenced May 16, 2026
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.
Summary
Adds a red warning banner above the Password section on /account.html when the user is still on rung 1 (default `me`/`me`). Auto-detected via a server-side probe — no localStorage state to go stale.
How the probe works
On page load (signed-in branch), `/account.html` sends:
```http
PUT /idp/credentials
{"currentPassword":"me","newPassword":"me"}
```
…via `session.authFetch` (DPoP-bound). JSS's behaviour:
The side effect when default is a bcrypt re-hash of the same value. JSS rate-limits to 10/min per IP, so no abuse risk.
Banner UX
Test plan
What's not in this PR (next thing)
Welcome.html tiles still don't unlock after sign-in — they use plain `fetch` for the HEAD probe and miss the OIDC token. That's a separate ~30-line PR adding solid-oidc to welcome.html.
Refs #1 #6