fix(security): close six open GHSA findings from security triage

Harden share-link listing, password rotation, OIDC callback binding,
org invite search, knowledge batch mutations, and connector redirects.
This commit is contained in:
wizardchen
2026-07-02 14:49:27 +08:00
committed by lyingbug
parent fc64751f4e
commit f23c674bad
12 changed files with 400 additions and 34 deletions
+3 -5
View File
@@ -1870,6 +1870,8 @@ func (h *OrganizationHandler) SearchTenantsForInvite(c *gin.Context) {
// 1) Match users by query and group by TenantID. We over-fetch so the
// de-duplication after filtering "already a member" tenants still
// leaves us with enough candidates to fill `limit`.
// User PII (email/username) is intentionally omitted from results:
// org admins only need tenant identity to send an invite.
users, err := h.userService.SearchUsers(ctx, query, limit*3+20)
if err != nil {
logger.Errorf(ctx, "Failed to search users: %v", err)
@@ -1902,11 +1904,7 @@ func (h *OrganizationHandler) SearchTenantsForInvite(c *gin.Context) {
seen[u.TenantID] = &entry{
idx: len(seen),
candidate: types.TenantInviteCandidate{
TenantID: u.TenantID,
RepresentativeUserID: u.ID,
RepresentativeUsername: u.Username,
RepresentativeEmail: u.Email,
RepresentativeAvatar: u.Avatar,
TenantID: u.TenantID,
},
}
}