This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new af3966f93d 69576: Add extra InaccessibleObjectException catch
af3966f93d is described below
commit af3966f93de4944f5e11b20650d6d34dd8715b1e
Author: remm <[email protected]>
AuthorDate: Tue Feb 11 11:41:15 2025 +0100
69576: Add extra InaccessibleObjectException catch
---
java/org/apache/tomcat/util/compat/JreCompat.java | 3 ++-
webapps/docs/changelog.xml | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/compat/JreCompat.java
b/java/org/apache/tomcat/util/compat/JreCompat.java
index 0aae54fe95..e188d57ed1 100644
--- a/java/org/apache/tomcat/util/compat/JreCompat.java
+++ b/java/org/apache/tomcat/util/compat/JreCompat.java
@@ -17,6 +17,7 @@
package org.apache.tomcat.util.compat;
import java.lang.reflect.Field;
+import java.lang.reflect.InaccessibleObjectException;
import java.net.SocketAddress;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
@@ -99,7 +100,7 @@ public class JreCompat {
Class<?> clazz = Class.forName("java.io.FileSystem");
f1 = clazz.getDeclaredField("useCanonCaches");
f1.setAccessible(true);
- } catch (ReflectiveOperationException | IllegalArgumentException e) {
+ } catch (InaccessibleObjectException | ReflectiveOperationException |
IllegalArgumentException e) {
/*
* Log at debug level as this will only be an issue if the field
needs to be accessed and most
* configurations will not need to do so. Appropriate warnings
will be logged if an attempt is made to use
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6e9208552c..343847867e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,15 @@
issues do not "pop up" wrt. others).
-->
<section name="Tomcat 10.1.35 (schultz)" rtext="in development">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <bug>69576</bug>: Avoid possible failure intializing
+ <code>JreCompat</code> due to uncaught exception introduced for the
+ check for CVE-2004-56337. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<add>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]