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

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new ad3de0b  Avoid possible Windows path issues
ad3de0b is described below

commit ad3de0b5ac786214a6c272b65ed4af419a735042
Author: remm <r...@apache.org>
AuthorDate: Tue Oct 8 18:13:11 2019 +0200

    Avoid possible Windows path issues
    
    Bad paths for URIs can cause exceptions on Windows due to its path
    separator, so wrap using the usual IOException.
---
 .../apache/catalina/startup/CatalinaBaseConfigurationSource.java  | 7 ++++++-
 webapps/docs/changelog.xml                                        | 8 ++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git 
a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java 
b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
index 51b3b85..134b6a4 100644
--- a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
+++ b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
@@ -103,7 +103,12 @@ public class CatalinaBaseConfigurationSource implements 
ConfigurationSource {
         }
 
         // Then try URI.
-        URI uri = getURI(name);
+        URI uri = null;
+        try {
+            uri = getURI(name);
+        } catch (IllegalArgumentException e) {
+            throw new 
IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name), 
e);
+        }
 
         // Obtain the input stream we need
         try {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a5c88f1..2fb65e2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 9.0.28 (markt)" rtext="in development">
+  <subsection name="Catalina">
+    <changelog>
+      <fix>
+        Bad paths for URIs can cause exceptions on Windows due to its
+        path separator, so wrap using an IOException. (remm)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 9.0.27 (markt)" rtext="release in progress">
   <subsection name="Catalina">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to