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 edd2525de2 Take account of tomcatAuthorization for auth_type edd2525de2 is described below commit edd2525de288b2cadd9ec2a03cc3eef5c55c429e Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Sep 21 22:21:22 2023 +0100 Take account of tomcatAuthorization for auth_type This aligns the handling of auth_type (0x04) with that of remote_user (0x03). --- java/org/apache/coyote/ajp/AjpProcessor.java | 9 +++++---- webapps/docs/changelog.xml | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java b/java/org/apache/coyote/ajp/AjpProcessor.java index 9b6063ef33..ef22da9c68 100644 --- a/java/org/apache/coyote/ajp/AjpProcessor.java +++ b/java/org/apache/coyote/ajp/AjpProcessor.java @@ -798,11 +798,12 @@ public class AjpProcessor extends AbstractProcessor { break; case Constants.SC_A_AUTH_TYPE: - if (protocol.getTomcatAuthentication()) { - // ignore server - requestHeaderMessage.getBytes(tmpMB); - } else { + if (protocol.getTomcatAuthorization() || !protocol.getTomcatAuthentication()) { + // Implies tomcatAuthentication == false requestHeaderMessage.getBytes(request.getAuthType()); + } else { + // Ignore user information from reverse proxy + requestHeaderMessage.getBytes(tmpMB); } break; diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index f9d35fc487..302d10afc3 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -119,6 +119,12 @@ </subsection> <subsection name="Coyote"> <changelog> + <fix> + <bug>67198</bug>: Ensure that the AJP connector attribute + <code>tomcatAuthorization</code> takes precedence over the + <code>tomcatAuthentication</code> attribute when processing an + <code>auth_type</code> attribute received from a proxy server. (markt) + </fix> <fix> <bug>67235</bug>: Fix a <code>NullPointerException</code> when an <code>AsyncListener</code> handles an error with a dispatch rather than --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org