X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/b658810bd0ea529e2412fdc33e5848278863d1b7..a1d59523f422c3674a39b0d65ea2c97acca7ede8:/apps/fileupload/views.py?ds=sidebyside diff --git a/apps/fileupload/views.py b/apps/fileupload/views.py index d08bfd32..ab719a19 100644 --- a/apps/fileupload/views.py +++ b/apps/fileupload/views.py @@ -78,7 +78,7 @@ class UploadView(FormView): settings.MEDIA_ROOT, self.get_directory(), filename)) - if not path.startswith(settings.MEDIA_ROOT): + if not path.startswith(os.path.abspath(settings.MEDIA_ROOT)): raise Http404 if filename: if not path.startswith(self.get_safe_path()):