You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/02/27 09:27:36 UTC
[tomcat] branch master updated: Ignore zero length secret
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 260ee86 Ignore zero length secret
260ee86 is described below
commit 260ee860702b237c69211fc58687d06b5b43aded
Author: remm <re...@apache.org>
AuthorDate: Thu Feb 27 10:27:20 2020 +0100
Ignore zero length secret
No doc fix needed, secretRequired was already well described.
---
java/org/apache/coyote/ajp/AjpProcessor.java | 4 ++--
webapps/docs/changelog.xml | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java b/java/org/apache/coyote/ajp/AjpProcessor.java
index 9db523b..a333d04 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -859,7 +859,7 @@ public class AjpProcessor extends AbstractProcessor {
case Constants.SC_A_SECRET:
requestHeaderMessage.getBytes(tmpMB);
- if (secret != null) {
+ if (secret != null && secret.length() > 0) {
secretPresentInRequest = true;
if (!tmpMB.equals(secret)) {
response.setStatus(403);
@@ -877,7 +877,7 @@ public class AjpProcessor extends AbstractProcessor {
}
// Check if secret was submitted if required
- if ((secret != null) && !secretPresentInRequest) {
+ if (secret != null && secret.length() > 0 && !secretPresentInRequest) {
response.setStatus(403);
setErrorState(ErrorState.CLOSE_CLEAN, null);
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 62a9f8a..13def23 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -87,6 +87,10 @@
Add the TLS request attributes used by IIS to the attributes that an AJP
Connector will always accept. (markt)
</fix>
+ <fix>
+ A zero length AJP secret will now behave as if it has not been
+ specified. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org