Commit 5d0cae2
fix: enforce community ownership on earnings withdrawal (#832)
The withdrawEarnings action looked up the community only by the id taken
from the callback data, without checking that the caller actually owns it.
Scope the lookup by creator_id as well, matching the other community
management handlers (deleteCommunity, changeVisibility, updateCommunity),
so only the community creator can start a withdrawal of its earnings.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 084c0da commit 5d0cae2
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
0 commit comments