diff --git a/build.properties.default b/build.properties.default
index 5665dde93a95..5ab731ceb6d4 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -33,7 +33,7 @@ version.major=8
version.minor=5
version.build=100
version.patch=0
-version.suffix=-TT.3
+version.suffix=-TT.4
version.dev=
# ----- Build tools -----
diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
index b4eb94ebfd9c..7a9f3b4269cd 100644
--- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java
+++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
@@ -806,6 +806,8 @@ private boolean authenticateJaspic(Request request, Response response, JaspicSta
authStatus = state.serverAuthContext.validateRequest(state.messageInfo, client, null);
} catch (AuthException e) {
log.debug(sm.getString("authenticator.loginFail"), e);
+ // Need to explicitly set the return code as the ServerAuthContext may not have done.
+ response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return false;
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 839eaf8b92b3..bb8154ec25a1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -145,6 +145,11 @@
NullPointerException
, if an attempt is made to use the
AsyncContext
after it has been recycled. (markt)
+
+ If the Jakarta Authentication process fails with an Exception,
+ explicitly set the HTTP response status to 500 as the
+ ServerAuthContext
may not have set it. (markt)
+