Skip to Content.
Sympa Menu

notify-dpml - r902 - trunk/main/planet/http/impl/src/main/net/dpml/http/impl

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r902 - trunk/main/planet/http/impl/src/main/net/dpml/http/impl
  • Date: Wed, 11 Jan 2006 06:54:21 +0100

Author: mcconnell
Date: 2006-01-11 06:54:18 +0100 (Wed, 11 Jan 2006)
New Revision: 902

Modified:

trunk/main/planet/http/impl/src/main/net/dpml/http/impl/HttpContextImpl.java
Log:
add writable check on temp directory and throw a SecurityException if there
is an issue

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/impl/HttpContextImpl.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/impl/HttpContextImpl.java
2006-01-11 04:50:55 UTC (rev 901)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/impl/HttpContextImpl.java
2006-01-11 05:54:18 UTC (rev 902)
@@ -136,14 +136,23 @@
* @param context the deplooyment context
* @param conf supplimentary configuration
* @exception ConfigurationException if a configuration error occurs
+ * @exception SecurityException if the temporary directory is not writable
*/
public HttpContextImpl( Logger logger, Context context, Configuration
conf )
- throws ConfigurationException
+ throws ConfigurationException, SecurityException
{
m_logger = logger;

File tmpDir = context.getTempDirectory();
tmpDir.mkdirs();
+ if( !tmpDir.canWrite() )
+ {
+ final String error =
+ "Assigned HTTP context temporary dir is not writable."
+ + "\nDirectory: " + tmpDir;
+ throw new SecurityException( error );
+ }
+
setTempDirectory( tmpDir );
ClassLoader cl = HttpContextImpl.class.getClassLoader();
setClassLoader( cl );




  • r902 - trunk/main/planet/http/impl/src/main/net/dpml/http/impl, mcconnell at BerliOS, 01/11/2006

Archive powered by MHonArc 2.6.24.

Top of Page