Skip to content

Error while reading from Writer: bufio.Scanner: token too long #1370

@kke

Description

@kke

This happens if you try to log something that is longer than 64kb without newlines through something like cmd.Stdout = logrus.Writer().

This can cause a denial of service in some cases.

The culprit is here:
https://github.com/sirupsen/logrus/blob/master/writer.go#L58-L59

Maybe it needs a custom scanner.Split(...) function or some other invention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions