Repository navigation
feat: require fresh auth tokens for privileged actions - #8264
mergify[bot] merged 4 commits into
Conversation
|
Note This changelog has been baked. Any further edits will not be reflected. Pull request changelogAppAddedChangedDeprecatedRemovedFixedSecurityWebsiteAddedChangedDeprecatedRemovedFixedSecurity
HostingAddedChangedDeprecatedRemovedFixedSecurity |
[High impact] The freshness rule reaches sensitive account, credential, and marketplace actions. The PR needs a working reauthentication path and consistent error responses before merging.
|
| require_privileged_token(&req, &**pool, &redis) | ||
| .await | ||
| .wrap_auth_err("checking privileged token age")?; |
There was a problem hiding this comment.
Users with sessions older than 15 minutes can no longer create, edit, or revoke PATs from settings. The website only shows an error notification; neither the page nor the shared client starts reauthentication. Refreshing the session cannot recover because it preserves created.
Connect this rejection to a fresh login and let users retry before enabling these checks.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/labrinth/src/routes/internal/pats.rs
Line: 137-139
Comment:
**PAT settings stop working**
Users with sessions older than 15 minutes can no longer create, edit, or revoke PATs from settings. The website only shows an error notification; neither the page nor the shared client starts reauthentication. Refreshing the session cannot recover because it preserves `created`.
Connect this rejection to a fresh login and let users retry before enabling these checks.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Frontend will handle 401s here and prompt a relogin
There was a problem hiding this comment.
That addresses my concern—thanks. The privileged-token expiry is returned as a 401, and prompting for a full relogin (rather than a silent refresh) should issue a fresh token so users can retry.
|
Queue requested — the merge queue status continues in this comment ↓. |
…n-token-checks-for-privileged-actions
✅ Merged into
|
No description provided.