Skip to content

Security improvements - #19

Merged
goshatch merged 26 commits into
mainfrom
security-fixes
Jul 26, 2026
Merged

Security improvements#19
goshatch merged 26 commits into
mainfrom
security-fixes

Conversation

@goshatch

Copy link
Copy Markdown
Member

Hardening the heck out of this thing

goshatch added 21 commits July 26, 2026 20:40
An attacker could rotate the leftmost X-Forwarded-For value to land
every request in a fresh bucket, bypassing the only brute-force control
on login, register, and invite redemption (TASK-088).

The limiter now trusts a single proxy-set header (default X-Real-IP,
overridable via PARTS__RATELIMIT__CLIENT_IP_HEADER for a future CDN
edge); the generated Caddyfiles delete any client-supplied X-Real-IP and
set it from the real peer. Absent header falls back to :remote-addr —
one shared bucket, over-throttling rather than a bypass.
An authenticated session could silently rotate the login email or
password — brief access to a session (shared device, session theft)
meant full account takeover or lockout (TASK-090).

update-account now demands a correct :current_password whenever the body
touches :email or :password (step-up re-auth via
auth/current-password-valid?, which checks the stored hash directly
since user/fetch strips it). Display-name-only updates are unaffected.
New-email ownership confirmation and old-address notification remain
open pending the transactional mail layer.
@goshatch
goshatch merged commit 2d9eef4 into main Jul 26, 2026
2 checks passed
@goshatch
goshatch deleted the security-fixes branch July 26, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant