diff roundup/cgi/client.py @ 2656:b386e8811932 maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Mon, 02 Aug 2004 22:42:55 +0000
parents 9e1c4c932323
children 26b20d0b42fa
line wrap: on
line diff
--- a/roundup/cgi/client.py	Thu Jul 22 04:46:11 2004 +0000
+++ b/roundup/cgi/client.py	Mon Aug 02 22:42:55 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: client.py,v 1.176.2.3 2004-07-20 02:10:43 richard Exp $
+# $Id: client.py,v 1.176.2.4 2004-08-02 22:42:55 richard Exp $
 
 """WWW request handler (also used in the stand-alone server).
 """
@@ -460,6 +460,9 @@
         # outside of the static files dir
         prefix = getattr(self.instance.config, 'STATIC_FILES',
             self.instance.config.TEMPLATES)
+
+        # normalise the prefix and filename for the startswith comparison
+        prefix = os.path.normpath(prefix)
         filename = os.path.normpath(os.path.join(prefix, file))
         if not filename.startswith(prefix):
             raise NotFound, file

Roundup Issue Tracker: http://roundup-tracker.org/