summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-29 15:47:47 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-29 15:47:47 +0000
commitb6002d4af6330fd828db10afb450bfb7d5f8d628 (patch)
treeb6a05e4e11adac36ae97c665363991b509e2315d /django
parent3c272792d6207147c23d93baa282c0e2e5a4f874 (diff)
Fixed #1291 -- Fixed a potential infinite loop for some URL constructions in
the development server. Thanks, Graham Carlyle. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/views/static.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/views/static.py b/django/views/static.py
index b556c60ca6..f0e43ffe4e 100644
--- a/django/views/static.py
+++ b/django/views/static.py
@@ -33,6 +33,7 @@ def serve(request, path, document_root=None, show_indexes=False):
# Clean up given path to only allow serving files below document_root.
path = posixpath.normpath(urllib.unquote(path))
+ path = path.lstrip('/')
newpath = ''
for part in path.split('/'):
if not part: