Skip to content

Commit

Permalink
Cherry-pick #25357 to 7.13: Fix s3 input when there is a blank line i…
Browse files Browse the repository at this point in the history
…n the log file (#25415)

(cherry picked from commit e8c73c4)
  • Loading branch information
kaiyan-sheng authored Apr 29, 2021
1 parent eb4fe1f commit b58dc15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Strip Azure Eventhub connection string in debug logs. {pulll}25066[25066]
- Updating Oauth2 flow for m365_defender fileset. {pull}24829[24829]
- Fix o365 module config when client_secret contains special characters. {issue}25058[25058]
- Fix s3 input when there is a blank line in the log file. {pull}25357[25357]

*Heartbeat*

Expand Down
3 changes: 1 addition & 2 deletions x-pack/filebeat/input/awss3/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ func (c *s3Collector) createEventsFromS3Info(svc s3iface.ClientAPI, info s3Info,
}

if log == "" {
break
continue
}

// create event per log line
Expand All @@ -409,7 +409,6 @@ func (c *s3Collector) createEventsFromS3Info(svc s3iface.ClientAPI, info s3Info,
return err
}
}
return nil
}

func (c *s3Collector) decodeJSON(decoder *json.Decoder, objectHash string, s3Info s3Info, s3Ctx *s3Context) error {
Expand Down

0 comments on commit b58dc15

Please sign in to comment.