Skip to content
This repository was archived by the owner on Nov 1, 2026. It is now read-only.

fix(leave): serialize decisions per page + scope the button page-id path - #811

Merged
tieubao merged 1 commit into
mainfrom
fix/leave-race-guard
Jul 22, 2026
Merged

tieubao merged 1 commit into
mainfrom
fix/leave-race-guard

Conversation

@tieubao

@tieubao tieubao commented Jul 22, 2026

Copy link
Copy Markdown
Member

Security-review follow-ups: per-page-id lock closes the idempotency race (single-replica); scope the button page-id resolution to leave-shaped pages. Follows #810.

Security-review follow-ups. (1) The idempotency guard was read-then-write
with a TOCTOU window: two near-simultaneous approvals of one request could
both create a calendar event. Serialize per page id with an in-process lock
(the api deployment is a single replica). (2) A button's page-id request
resolved via GetLeaveRequest, which reads any page the integration can see;
confirm the page is actually a leave request (OOO-/LVR- title) before acting.
@tieubao
tieubao merged commit fe1cb6a into main Jul 22, 2026
2 of 3 checks passed
@tieubao
tieubao deleted the fix/leave-race-guard branch July 22, 2026 05:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant