[core-be-agent] fix: Sanitize error messages to prevent information disclosure #164

Closed
core-be wants to merge 1 commits from fix/info-disclosure-errors into main
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -607,7 +607,7 @@ func (h *OrgHandler) Import(c *gin.Context) {
orgFile := filepath.Join(orgBaseDir, "org.yaml")
data, err := os.ReadFile(orgFile)
if err != nil {
c.JSON(http.StatusNotFound, gin.H{"error": fmt.Sprintf("org template not found: %s", body.Dir)})
c.JSON(http.StatusNotFound, gin.H{"error": "org template not found"})
return
}
// Expand !include directives before unmarshal. Splits org.yaml
@@ -332,7 +332,7 @@ func (h *WorkspaceHandler) Delete(c *gin.Context) {
descendantIDs, stopErrs, err := h.CascadeDelete(ctx, id)
if err != nil {
log.Printf("Delete: CascadeDelete(%s) failed: %v", id, err)
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
c.JSON(http.StatusInternalServerError, gin.H{"error": "internal error processing delete request"})
return
}
allIDs := append([]string{id}, descendantIDs...)