tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1333827 - /tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
Date Fri, 04 May 2012 09:43:38 GMT
Author: markt
Date: Fri May  4 09:43:38 2012
New Revision: 1333827

URL: http://svn.apache.org/viewvc?rev=1333827&view=rev
Log:
Use a proper URL else attempts to external entities will fail.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Catalina.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1333827&r1=1333826&r2=1333827&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Fri May  4 09:43:38 2012
@@ -451,7 +451,7 @@ public class Catalina {
             FileInputStream fis = null;
             try {
                 InputSource is =
-                    new InputSource("file://" + file.getAbsolutePath());
+                    new InputSource(file.toURI().toURL().toString());
                 fis = new FileInputStream(file);
                 is.setByteStream(fis);
                 digester.push(this);
@@ -539,7 +539,7 @@ public class Catalina {
         try {
             file = configFile();
             inputStream = new FileInputStream(file);
-            inputSource = new InputSource("file://" + file.getAbsolutePath());
+            inputSource = new InputSource(file.toURI().toURL().toString());
         } catch (Exception e) {
             if (log.isDebugEnabled()) {
                 log.debug(sm.getString("catalina.configFail", file), e);



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


Mime
View raw message