Skip to content

Commit 5482a3d

Browse files
authored
Merge pull request from GHSA-hwhf-64mh-r662
parser_apache2: Fix too wide matching regexp
2 parents f10541b + db93f4b commit 5482a3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/fluent/plugin/parser_apache2.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module Plugin
2121
class Apache2Parser < Parser
2222
Plugin.register_parser('apache2', self)
2323

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

2727
def initialize

0 commit comments

Comments
 (0)