Repository navigation
fix(users): stop a blocked user from impersonating - #15021
Conversation
The blocked check on HTTP requests looked at the impersonation target, so a blocked user holding the impersonator capability and a live session kept access by impersonating any active user. A blocked actor no longer resolves an impersonation, so the check sees the actor itself, as realtime connections already do.
|
Review complete. No issues found — approved ✅. This PR blocks impersonation requests when the acting (impersonating) user has a blocked status, closing a trust-boundary gap where suspended users could still issue impersonated sessions.
The gate consistently covers the header and query-param impersonation paths, and the injected Reviewed commit: b07722d |
🟢 Tier S · Ready to merge
HTTP impersonation resolution now returns no impersonator for a blocked actor, allowing the existing authorization check to reject the actor instead of applying the target user. The Users E2E suite covers impersonation through both the header and query-parameter paths before and after blocking the actor.
📂 Walkthrough · 2
Merged |
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
The blocked check on HTTP requests looked at the impersonation target, so a blocked user holding the impersonator capability and a live session kept access by impersonating any active user. A blocked actor no longer resolves an impersonation, so the check sees the actor itself, as realtime connections already do.
Lint, PHPStan and the touched unit tests passed locally before rebasing on main; e2e runs in CI.
Related: appwrite-labs/cloud#6666