Skip to content

CRITICAL: fallback to MEDIA_ROOT should be clearly documented to prevent leaking the source folder #65

@olivierdalang

Description

@olivierdalang

Hey ! First, thanks for the package.

Using this package, I wasn't aware that that library falls back to service regular filesystem MEDIA_ROOT if there is no hit in the database. Indeed if you read through the README carefuly, you get it, but it's not obvious from the library's scope.

Since I was expecting to not use the MEDIA_ROOT whatsoever, I didn't put that in my settings.py, so it uses django's default which is "".

Results: django-binary-database-files default endpoint happily leaks my source folder !!

I think the library should throw an Exception if MEDIA_ROOT isn't explictly set (arguably, Django should include such as warning out of the box), and this should be more clearly documented.

I may be able to work on a fix if you're taking in PRs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions