fix(security): enforce KB access on wiki reads and related IDOR paths
Gate wiki GET routes and initialization config reads with KBAccessRead, and bind async task progress endpoints to the caller tenant via task ID parsing. Closes cross-tenant read paths reported in GHSA-ph8f-4qwx-89rr and related initialization/progress leaks.
This commit is contained in:
@@ -1107,6 +1107,10 @@ func (h *KnowledgeBaseHandler) GetKBCloneProgress(c *gin.Context) {
|
||||
c.Error(apperrors.NewBadRequestError("Task ID cannot be empty"))
|
||||
return
|
||||
}
|
||||
if err := requireTaskProgressTenant(ctx, taskID); err != nil {
|
||||
c.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
progress, err := h.knowledgeService.GetKBCloneProgress(ctx, taskID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user