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:29:09 UTC
[tomcat] branch 8.5.x updated: Ignore zero length secret
This is an automated email from the ASF dual-hosted git repository.
remm 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 ac347fa Ignore zero length secret
ac347fa is described below
commit ac347fa64ab8b3bf72d28d1b6c0e754d7d2d9f3d
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 396e51b..6109719 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -942,7 +942,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);
@@ -960,7 +960,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 4544a52..a44dd00 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -100,6 +100,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="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org