aboutsummaryrefslogtreecommitdiff
path: root/src/lib/analytics.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-06-01 15:11:27 +0000
committerFuwn <[email protected]>2026-06-01 15:11:27 +0000
commit7c49986a5646e892a115725abb43cf97b5d7c1d2 (patch)
treeed842f6009cdd07f0ff890bfde3be90c49759970 /src/lib/analytics.ts
parentfix(badges): drop content-visibility that clipped tooltip and tilt (diff)
downloaddue.moe-main.tar.xz
due.moe-main.zip
fix(security): authorize shadowHide target in badges endpoint (IDOR)HEADmain
PUT /api/badges?shadowHide=<userId> called setShadowHidden on an arbitrary user_id with no ownership/privilege check, so any logged-in user could flip shadow_hidden on another user's badges (e.g. un-hide moderator-hidden ones). The GraphQL path already guarded this; the REST twin didn't. Extract the owner-or-privileged check into a shared isOwnerOrPrivileged helper, use it in both the REST endpoint and the GraphQL resolver, and add a regression test.
Diffstat (limited to 'src/lib/analytics.ts')
0 files changed, 0 insertions, 0 deletions