[security] Implement CSRF protection for all forms #35
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From Security Audit (#33 comment)
Severity: BLOCKER
None of the 12+ POST forms have CSRF tokens. An attacker can craft a page that submits forms on behalf of an authenticated user.
Suggested fix: Add CSRF middleware (e.g.
gorilla/csrfor custom token-in-form approach). All state-changing POST handlers need token verification.