Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Safely join paths in staticfiles finder.

git-svn-id: 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/
3  django/contrib/staticfiles/
@@ -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 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

0 comments on commit e45d1e2

Please sign in to comment.
Something went wrong with that request. Please try again.