diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-01-02 01:31:55 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-01-02 01:31:55 +0000 |
| commit | e45d1e2dac84256d1486d72649548e876206658e (patch) | |
| tree | c795193d4011d4e23bac7bb01574dbfc72264182 | |
| parent | 9c950db518fa2210b4f7963ee954148aba68cfaf (diff) | |
Safely join paths in staticfiles finder.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/staticfiles/finders.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/staticfiles/finders.py b/django/contrib/staticfiles/finders.py index a43412c499..ccb826882a 100644 --- a/django/contrib/staticfiles/finders.py +++ b/django/contrib/staticfiles/finders.py @@ -6,6 +6,7 @@ from django.core.files.storage import default_storage, Storage, FileSystemStorag 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 @@ class FileSystemFinder(BaseFinder): 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 |
