Class ParseErrorLine

java.lang.Object
org.apache.pekko.http.impl.model.parser.ParseErrorLine

public class ParseErrorLine extends Object
INTERNAL API

Renders the input line a parse error occurred on with a caret under the failing position, the way parboiled2's ErrorFormatter.formatErrorLine does, but with every control character escaped the way ErrorFormatter.format already escapes the offending character in its summary.

The line is attacker-controlled -- a request target, a header value -- and the default error-logging-verbosity = full writes it to the log, so a raw CR, ESC or NUL in it would let a client inject line breaks or terminal control sequences into log output.

  • Constructor Details

    • ParseErrorLine

      public ParseErrorLine()
  • Method Details

    • render

      public static String render(org.parboiled2.ParseError error, org.parboiled2.ParserInput input)