给出可直接套用的代码审计比对思路,快速定位同类授权缺失。
绕过议题
Sometimes, doing code review is just as easy as playing spot the difference...
Two handlers, same file, 40 lines apart. Same auth decorator, so both need a valid login. Both read current_user_id.
Both read group_id from the request body.
One asks whether you're allowed to see that group. One doesn't.
You don't need to have in-depth understanding of Python, authorisation logic or code review.
You just need the right idea: "Are all those functions checking the same thing, if not, what is the security impact?"
CVE-2026-121552