Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Safely join paths in staticfiles finder.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e45d1e2dac84256d1486d72649548e876206658e 1 parent 9c950db
@jezdez jezdez authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/contrib/staticfiles/finders.py
View
3  django/contrib/staticfiles/finders.py
@@ -6,6 +6,7 @@
from django.utils.datastructures import SortedDict
from django.utils.functional import memoize, LazyObject
from django.utils.importlib import import_module
+from django.utils._os import safe_join
from django.contrib.staticfiles import utils
from django.contrib.staticfiles.storage import AppStaticStorage
@@ -83,7 +84,7 @@ def find_location(self, root, path, prefix=None):
if not path.startswith(prefix):
return None
path = path[len(prefix):]
- path = os.path.join(root, path)
+ path = safe_join(root, path)
if os.path.exists(path):
return path
Please sign in to comment.
Something went wrong with that request. Please try again.