diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 3825ab33dd8..92464dcdb0c 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -206,6 +206,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] *Packetbeat* +- Fix upload of bundled ingest pipelines on Windows. {pull}41110[41110] *Winlogbeat* diff --git a/packetbeat/module/pipeline.go b/packetbeat/module/pipeline.go index 9e6d2384938..c90f0adda76 100644 --- a/packetbeat/module/pipeline.go +++ b/packetbeat/module/pipeline.go @@ -22,7 +22,6 @@ import ( "encoding/json" "errors" "fmt" - "os" "path" "path/filepath" "strings" @@ -113,7 +112,10 @@ func readFile(filename string, info beat.Info) (p pipeline, err error) { if err != nil { return pipeline{}, err } - ds, _, _ := strings.Cut(filename, string(os.PathSeparator)) + ds, _, ok := strings.Cut(filename, "/") + if !ok { + return pipeline{}, fmt.Errorf("unexpected filename '%s': missing '/' between data stream and 'ingest'", filename) + } p = pipeline{ id: fileset.FormatPipelineID(info.IndexPrefix, "", "", ds, info.Version), contents: updatedContent,