This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new eb1a95ac47 Avoid null response eb1a95ac47 is described below commit eb1a95ac47ca4862bb3ae1c6b9f60766c3e3d3f0 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue May 10 14:17:06 2022 +0100 Avoid null response --- java/org/apache/catalina/filters/CsrfPreventionFilter.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java b/java/org/apache/catalina/filters/CsrfPreventionFilter.java index 159d8ed318..4e179d1c18 100644 --- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java +++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java @@ -191,11 +191,9 @@ public class CsrfPreventionFilter extends CsrfPreventionFilterBase { wResponse = new CsrfResponseWrapper(res, nonceRequestParameterName, newNonce); } - } else { - wResponse = response; } - chain.doFilter(request, wResponse); + chain.doFilter(request, wResponse == null ? response : wResponse); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org