Skip to content

Commit

Permalink
Merge pull request from GHSA-hwhf-64mh-r662
Browse files Browse the repository at this point in the history
parser_apache2: Fix too wide matching regexp
  • Loading branch information
ashie authored Oct 29, 2021
2 parents f10541b + db93f4b commit 5482a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/parser_apache2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Plugin
class Apache2Parser < Parser
Plugin.register_parser('apache2', self)

REGEXP = /^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>(?:[^\"]|\\.)*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>(?:[^\"]|\\.)*)" "(?<agent>(?:[^\"]|\\.)*)")?$/
REGEXP = /^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>(?:[^\"]|\\")*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>(?:[^\"]|\\")*)" "(?<agent>(?:[^\"]|\\")*)")?$/
TIME_FORMAT = "%d/%b/%Y:%H:%M:%S %z"

def initialize
Expand Down

0 comments on commit 5482a3d

Please sign in to comment.