Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 59967 Details for
Bug 157130
Severity not parsed correctly for some Apache access log records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Patch for the problems described in this defect
patch.txt (text/plain), 5.76 KB, created by
Rohit Shetty
on 2007-02-28 07:39:31 EST
(
hide
)
Description:
Patch for the problems described in this defect
Filename:
MIME Type:
Creator:
Rohit Shetty
Created:
2007-02-28 07:39:31 EST
Size:
5.76 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.logging.parsers >Index: config/Apache/access/v1.3.26/regex.adapter >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.hyades.logging.parsers/config/Apache/access/v1.3.26/regex.adapter,v >retrieving revision 1.10 >diff -u -r1.10 regex.adapter >--- config/Apache/access/v1.3.26/regex.adapter 20 Sep 2006 02:59:58 -0000 1.10 >+++ config/Apache/access/v1.3.26/regex.adapter 28 Feb 2007 12:27:05 -0000 >@@ -161,6 +161,8 @@ > <SubstitutionRule match="4\d{2}" positions="9" substitute="40" useBuiltInFunction="false"/> > <SubstitutionRule match="\"\S+\"@@5\d{2}" positions="6@@7" substitute="60" useBuiltInFunction="false"/> > <SubstitutionRule match="\"\S+\"@@4\d{2}" positions="6@@7" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+5\d{2}\s+\d+.*" positions="" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+4\d{2}\s+\d+.*" positions="" substitute="40" useBuiltInFunction="false"/> > </parser:RuleAttribute> > </parser:RuleElement> > </cc:Parser> >Index: config/Apache/access/v1.3.26/regex_example.adapter >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.hyades.logging.parsers/config/Apache/access/v1.3.26/regex_example.adapter,v >retrieving revision 1.8 >diff -u -r1.8 regex_example.adapter >--- config/Apache/access/v1.3.26/regex_example.adapter 12 May 2006 19:19:16 -0000 1.8 >+++ config/Apache/access/v1.3.26/regex_example.adapter 28 Feb 2007 12:27:06 -0000 >@@ -27,7 +27,7 @@ > <pu:Property propertyName="fileName" propertyValue="example.log"/> > <sensor:SingleFileSensor directory="." fileName="example.log"/> > </cc:Sensor> >- <ex:Extractor containsLineBreaks="true" description="This extractor uses regular expression patterns to identify record delimiters" endPattern="$" includeEndPattern="false" includeStartPattern="true" lineBreakSymbol="" replaceLineBreaks="false" startPattern="^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})|(\S+)" uniqueID="N36299800F8511D88000A31D7605087A"/> >+ <ex:Extractor description="This extractor uses regular expression patterns to identify record delimiters" uniqueID="N36299800F8511D88000A31D7605087A" containsLineBreaks="true" endPattern="$" includeEndPattern="false" includeStartPattern="true" lineBreakSymbol="" replaceLineBreaks="false" startPattern="^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})|(\S+)"/> > <cc:Parser separatorToken="\s+" uniqueID="N3650A800F8511D88000A31D7605087A"> > <parser:RuleElement index="N3650A810F8511D88000A31D7605087A" name="CommonBaseEvent"> > <parser:RuleElement index="N8CA7C54002A11D88000C6FD28070181" name="sourceComponentId"> >@@ -159,6 +159,8 @@ > <SubstitutionRule match="4\d{2}" positions="9" substitute="40" useBuiltInFunction="false"/> > <SubstitutionRule match="\"\S+\"@@5\d{2}" positions="6@@7" substitute="60" useBuiltInFunction="false"/> > <SubstitutionRule match="\"\S+\"@@4\d{2}" positions="6@@7" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+5\d{2}\s+\d+.*" positions="" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+4\d{2}\s+\d+.*" positions="" substitute="40" useBuiltInFunction="false"/> > </parser:RuleAttribute> > </parser:RuleElement> > </cc:Parser> >Index: src/org/eclipse/hyades/logging/parsers/AbstractAccessLogParser.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.hyades.logging.parsers/src/org/eclipse/hyades/logging/parsers/AbstractAccessLogParser.java,v >retrieving revision 1.11 >diff -u -r1.11 AbstractAccessLogParser.java >--- src/org/eclipse/hyades/logging/parsers/AbstractAccessLogParser.java 24 Aug 2006 17:43:27 -0000 1.11 >+++ src/org/eclipse/hyades/logging/parsers/AbstractAccessLogParser.java 28 Feb 2007 12:27:08 -0000 >@@ -707,7 +707,11 @@ > > // Look for the first space and the end of the quoted string > int fileNameStartIndex = message.indexOf(' '); >- int fileNameEndIndex = message.lastIndexOf('"'); >+ /* >+ * The check for "\" " allows us to extract the fileName from records like: >+ * "GET /cgi-bin/htsearch?Exclude="%60/etc/passwd%60" HTTP/1.0" 404 210 "-" "Network-Services-Auditor/1.3.1" >+ */ >+ int fileNameEndIndex = message.indexOf("\" "); > if (fileNameStartIndex >= 0 && fileNameEndIndex >= 0 && fileNameStartIndex < fileNameEndIndex) { > String tmpFileName = message.substring(fileNameStartIndex, fileNameEndIndex).trim(); > /* Check to see if there is an extraneous string after the file name >@@ -768,6 +772,18 @@ > > if(count-- >= 1) { > returnCode = st.nextToken(); >+ /* >+ * In scenarios like: >+ * Message = "GET /cgi-bin/htsearch?Exclude="%60/etc/passwd%60" HTTP/1.0" 404 210 "-" "Network-Services-Auditor/1.3.1" >+ * the returnCode might have the value HTTP/1.0 which would result in invalid severity. The code below fixes this. >+ * Defect https://bugs.eclipse.org/bugs/show_bug.cgi?id=157130 >+ */ >+ if(returnCode.startsWith("HTTP")) >+ { >+ if(count-- >= 1) { >+ returnCode = st.nextToken(); >+ } >+ } > } > > if(returnCode.equals("-")) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 157130
:
50006
|
50007
| 59967 |
60061
|
60673
|
60674
|
61597