mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +00:00
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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user