Skip to content

Commit

Permalink
Backport: nest datapath in parents to prevent collision in nested imp…
Browse files Browse the repository at this point in the history
…ort git
  • Loading branch information
wildum committed Apr 29, 2024
1 parent 817be06 commit 81e88f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Main (unreleased)

- Fix an issue where JSON string array elements were not parsed correctly in `loki.source.cloudflare`. (@thampiotr)

- Fix an issue where nested import.git config blocks could conflict if they had the same labels. (@wildum)

- Fix SSRF vulnerability in `faro.receiver` by disabling source map download. (@hainenber)

Expand Down
2 changes: 2 additions & 0 deletions internal/flow/internal/controller/node_config_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ func (cn *ImportConfigNode) processImportBlock(stmt *ast.BlockStmt, fullName str
childGlobals := cn.globals
// Children have a special OnBlockNodeUpdate function which notifies the parent when its content changes.
childGlobals.OnBlockNodeUpdate = cn.onChildrenContentUpdate
// Children data paths are nested inside their parents to avoid collisions.
childGlobals.DataPath = filepath.Join(childGlobals.DataPath, cn.globalID)
cn.importConfigNodesChildren[stmt.Label] = NewImportConfigNode(stmt, childGlobals, sourceType)
return nil
}
Expand Down

0 comments on commit 81e88f7

Please sign in to comment.