You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/05/10 13:17:25 UTC
[tomcat] branch main updated: Avoid null response
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 5af33624a2 Avoid null response
5af33624a2 is described below
commit 5af33624a27d987a59e4cc0d2bc1d3880d1aeb9d
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 e3f50cd491..26279400a3 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org