This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new 0f3f701ef0 Avoid possible NPE 0f3f701ef0 is described below commit 0f3f701ef0c824896612334498827a658d00a8af Author: remm <r...@apache.org> AuthorDate: Tue Aug 20 14:15:59 2024 +0200 Avoid possible NPE Found by coverity. --- java/org/apache/catalina/filters/CsrfPreventionFilter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java b/java/org/apache/catalina/filters/CsrfPreventionFilter.java index 93f53f18a3..404fa0ff73 100644 --- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java +++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java @@ -241,7 +241,9 @@ public class CsrfPreventionFilter extends CsrfPreventionFilterBase { @Override public boolean test(String t) { String mimeType = context.getMimeType(t); - + if (mimeType == null) { + return false; + } return predicate.test(mimeType); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org