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 6f5182b4bc Handle IAE when processing URIs
6f5182b4bc is described below
commit 6f5182b4bc772ee7a4c512c0cbf428fef7e914e6
Author: remm <[email protected]>
AuthorDate: Wed Nov 12 16:59:38 2025 +0100
Handle IAE when processing URIs
new File(URI) throws IAEs in many cases, so skip in those cases.
BZ69877
---
java/org/apache/catalina/loader/WebappLoader.java | 3 ++-
webapps/docs/changelog.xml | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/loader/WebappLoader.java
b/java/org/apache/catalina/loader/WebappLoader.java
index e6091212d7..00fc04adb1 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -511,8 +511,9 @@ public class WebappLoader extends LifecycleMBeanBase
implements Loader {
try {
File f = new File(url.toURI());
repository = f.getAbsolutePath();
- } catch (URISyntaxException e) {
+ } catch (URISyntaxException | IllegalArgumentException e) {
// Can't convert from URL to URI. Treat as non-file
URL and skip.
+ continue;
}
} else {
continue;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cb2fa1d5cf..321c477213 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -113,6 +113,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>69877</bug>: Catch IllegalArgumentException when processing URIs
+ when creating the classpath to handle invalid URIs. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Clustering">
<changelog>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]