This is an automated email from the ASF dual-hosted git repository.

remm 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 b7d56609eb Handle IAE when processing URIs
b7d56609eb is described below

commit b7d56609eb7668a40a315f8349309b5ae242dbc6
Author: remm <[email protected]>
AuthorDate: Wed Nov 12 16:54:17 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 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index 9b4f0994b7..95826a216d 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -474,8 +474,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;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to