Commit 12e9b94
committed
fix(api): restore atomic ownership check on activity comment writes
Re-add the userId predicate to the UPDATE/DELETE WHERE clauses in the
activity comment controllers so the write itself enforces ownership,
matching the comment controllers. The preceding SELECT was already
checking ownership, but the write was open on id alone — a TOCTOU gap.1 parent 84fd6bd commit 12e9b94
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments