Skip to content

Commit a243ba3

Browse files
committed
Update logstash-modsecurity.conf
1 parent ca2f519 commit a243ba3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

logstash-modsecurity.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ filter {
8585
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8686

8787
ruby {
88-
code => "if !event['message'].nil?; modSecSectionData = event['message'].split(/(--[a-fA-F0-9]{8}-[A-Z]--)/); modSecSectionData.shift; for i in 0..(modSecSectionData.length-1); sectionName = modSecSectionData.shift; if sectionName.nil?; break; end; sectionData = modSecSectionData.shift; if sectionName.include? '-A--'; sectionName = 'rawSectionA'; elsif sectionName.include? '-B--'; sectionName = 'rawSectionB'; elsif sectionName.include? '-C--'; sectionName = 'rawSectionC'; elsif sectionName.include? '-D--'; sectionName = 'rawSectionD'; elsif sectionName.include? '-E--'; sectionName = 'rawSectionE'; elsif sectionName.include? '-F--'; sectionName = 'rawSectionF'; elsif sectionName.include? '-G--'; sectionName = 'rawSectionG'; elsif sectionName.include? '-H--'; sectionName = 'rawSectionH'; elsif sectionName.include? '-I--'; sectionName = 'rawSectionI'; elsif sectionName.include? '-J--'; sectionName = 'rawSectionJ'; elsif sectionName.include? '-K--'; sectionName = 'rawSectionK'; else; sectionName = ''; end;if !sectionName.nil? and sectionName != '' and sectionName != 'null' and sectionName != ' '; sectionName = sectionName.strip; sectionData = sectionData.strip; if !sectionName.nil? and sectionName != '' and sectionName != 'null' and sectionName != ' '; event.to_hash.merge!(sectionName => sectionData); end; end; end; end"
88+
code => "if !event['message'].nil?; modSecSectionData = event['message'].split(/(--[a-fA-F0-9]{8}-[A-Z]--)/); modSecSectionData.shift; for i in 0..(modSecSectionData.length-1); sectionName = modSecSectionData.shift; if sectionName.nil?; break; end; sectionData = modSecSectionData.shift; if sectionName.include? '-A--'; sectionName = 'rawSectionA'; elsif sectionName.include? '-B--'; sectionName = 'rawSectionB'; elsif sectionName.include? '-C--'; sectionName = 'rawSectionC'; elsif sectionName.include? '-D--'; sectionName = 'rawSectionD'; elsif sectionName.include? '-E--'; sectionName = 'rawSectionE'; elsif sectionName.include? '-F--'; sectionName = 'rawSectionF'; elsif sectionName.include? '-G--'; sectionName = 'rawSectionG'; elsif sectionName.include? '-H--'; sectionName = 'rawSectionH'; elsif sectionName.include? '-I--'; sectionName = 'rawSectionI'; elsif sectionName.include? '-J--'; sectionName = 'rawSectionJ'; elsif sectionName.include? '-K--'; sectionName = 'rawSectionK'; else; sectionName = ''; end;if !sectionName.nil? and sectionName != '' and sectionName != 'null' and sectionName != ' '; sectionName = sectionName.strip; if !sectionData.nil?; sectionData = sectionData.strip; end; if !sectionName.nil? and sectionName != '' and sectionName != 'null' and sectionName != ' '; event.to_hash.merge!(sectionName => sectionData); end; end; end; end"
8989
}
9090

9191

0 commit comments

Comments
 (0)