You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Jan Høydahl (Jira)" <ji...@apache.org> on 2019/11/08 10:44:00 UTC

[jira] [Commented] (SOLR-13905) Nullpointer exception in AuditEvent

    [ https://issues.apache.org/jira/browse/SOLR-13905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16970054#comment-16970054 ] 

Jan Høydahl commented on SOLR-13905:
------------------------------------

I plan to do two changes
 * resource should never be null. This may be a regression from 8.3 when we switched from {{getContextPath}} to {{getPathInfo}} to get the resource
 * Check for null explicitly in {{findRequestType}} and return UNKNOWN, as a safeguard.
 * Also I will pre-compile all the regexes so we don't need to compile those on every request but instead loop through the precompiled {{List<Pattern>}} - for performance reasons.

I currently have found no way to reproduce the exact null scenario in a test, just in a live test environment.

> Nullpointer exception in AuditEvent
> -----------------------------------
>
>                 Key: SOLR-13905
>                 URL: https://issues.apache.org/jira/browse/SOLR-13905
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Auditlogging
>    Affects Versions: 8.3
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>            Priority: Major
>             Fix For: 8.4, 8.3.1
>
>
> Nullpointer exception in AuditEvent for events with HttpServletRequest as input. Happens when {{getPathInfo()}} returns null, which was not caught by current tests. This causes the whole request to fail, rendering the audit service unusable.
> The nullpointer is experienced in the {{findRequestType()}} method when performing pattern match on the resource (path).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org