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 9be5760 Fix broken back-port 9be5760 is described below commit 9be57601efb8a81e3832feb0dd60b1eb9d2b61d5 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Feb 4 19:18:08 2020 +0000 Fix broken back-port --- java/org/apache/coyote/ajp/AbstractAjpProtocol.java | 1 + java/org/apache/coyote/ajp/AjpProcessor.java | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java index 1d42c36..bba4d6a 100644 --- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java @@ -253,6 +253,7 @@ public abstract class AbstractAjpProtocol<S> extends AbstractProtocol<S> { processor.setKeepAliveTimeout(getKeepAliveTimeout()); processor.setClientCertProvider(getClientCertProvider()); processor.setSendReasonPhrase(getSendReasonPhrase()); + processor.setAllowedArbitraryRequestAttributesPattern(getAllowedArbitraryRequestAttributesPattern()); return processor; } diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java b/java/org/apache/coyote/ajp/AjpProcessor.java index a14a960..06c25b7 100644 --- a/java/org/apache/coyote/ajp/AjpProcessor.java +++ b/java/org/apache/coyote/ajp/AjpProcessor.java @@ -360,6 +360,7 @@ public class AjpProcessor extends AbstractProcessor { this.clientCertProvider = clientCertProvider; } + @Deprecated private boolean sendReasonPhrase = false; @Deprecated @@ -368,6 +369,11 @@ public class AjpProcessor extends AbstractProcessor { } + private Pattern allowedArbitraryRequestAttributesPattern; + public void setAllowedArbitraryRequestAttributesPattern(Pattern allowedArbitraryRequestAttributesPattern) { + this.allowedArbitraryRequestAttributesPattern = allowedArbitraryRequestAttributesPattern; + } + // --------------------------------------------------------- Public Methods @Override @@ -838,12 +844,11 @@ public class AjpProcessor extends AbstractProcessor { } else { // All 'known' attributes will be processed by the previous // blocks. Any remaining attribute is an 'arbitrary' one. - Pattern pattern = protocol.getAllowedArbitraryRequestAttributesPattern(); - if (pattern == null) { + if (allowedArbitraryRequestAttributesPattern == null) { response.setStatus(403); setErrorState(ErrorState.CLOSE_CLEAN, null); } else { - Matcher m = pattern.matcher(n); + Matcher m = allowedArbitraryRequestAttributesPattern.matcher(n); if (m.matches()) { request.setAttribute(n, v); } else { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org