fix: org metadata API endpoints should respect org visibility for unauthenticated requests #690
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?
Summary
The
/orgs/{org}/issue-statuses,/orgs/{org}/issue-priorities, and/orgs/{org}/issue-typesendpoints are accessible without authentication. For public orgs this is fine, but private org metadata (custom statuses, priorities, types) can be enumerated by unauthenticated users.Fix
Add a visibility check in each handler: if the org is not public and the caller is not authenticated or not a member, return 404.
Files
routers/api/v1/org/issue_metadata.go— add visibility check to ListIssueStatuses, ListIssuePriorities, ListIssueTypes