Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 13956 invoked by uid 500); 13 Mar 2001 13:14:03 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 13927 invoked from network); 13 Mar 2001 13:14:00 -0000 From: "David Soroko" To: Subject: Unsafe path ? Date: Tue, 13 Mar 2001 14:52:36 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C0AB75.37C82200" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N ------=_NextPart_000_0000_01C0AB75.37C82200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi all >From within a servlet I am trying to read a file in the following way getServletContext().getResourceAsStream(getInitParameter("envFile")); When the parameter envFile has the value /WEB-INF/../../env.xml I am getting the following message from Tomcat: Unsafe path D:\Jupiter\tomcat\webapps\dir1\dir2\dir3 /WEB-INF/../../env.xml Any ideas why is that? Interestingly, when the parameter envFile has the value /WEB-INF/../env.xml Tomcat has no problems reading the file. This is on Tomcat 3.2/Wintel. TIA -- ============================================ David Soroko mailto:davids@mannanetwork.com http://www.geocities.com/SiliconValley/Campus/1628/ Group Manager, Core Technologies Manna Inc. ============================================ ------=_NextPart_000_0000_01C0AB75.37C82200 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Unsafe path ?

Hi all

From within a servlet I am trying to read a file in = the following way
    = getServletContext().getResourceAsStream(getInitParameter("envFile&qu= ot;));

When the parameter envFile has the value = /WEB-INF/../../env.xml   
I am getting the following message from = Tomcat:
    Unsafe path = D:\Jupiter\tomcat\webapps\dir1\dir2\dir3 = /WEB-INF/../../env.xml   

Any ideas why is that?

Interestingly, when the parameter envFile has the = value /WEB-INF/../env.xml   
Tomcat has no problems reading the file.

This is on Tomcat 3.2/Wintel.

TIA

--

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
David Soroko
mailto:davids@mannanetwork.com
http://www.g= eocities.com/SiliconValley/Campus/1628/
Group Manager, Core Technologies
Manna Inc.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 

------=_NextPart_000_0000_01C0AB75.37C82200--