Closed nitr0man closed 1 year ago
Is the issue with DROPBOX_ROOT_PATH = '/app.poo.foo/'
or something else stripping the beginning of backups
?
yes. I've got ckups/....
instead of backups/...
in model
What is the content of backup_file_validator
? I'm struggling to see how this app causes this issue but I can't say it's impossible.
just validation of file content (check that it's .tar.gz file).
Sorry, was a bit daft and forgot about the reality of lstrip
vs removeprefix
. This is now fixed.
I have Django installation with Dropbox storage for FileField content. With this settings it strips 2 symbols in path:
for ex., for field
when I tried to store file
site55-full_2023_02_07_13_13_49.tar.gz
I've gotckups/site55-full_2023_02_07_13_13_49.tar.gz
in FileField instead ofbackups/site55-full_2023_02_07_13_13_49.tar.gz
and of course file is unavailable in app.with 1.9.1 all is OK; 1.10.0-1.13.0 raise exception SuspiciousFileOperation: Detected path traversal attempt due to leading slash in path.
but with
first 2 symbols aren't stripped.
Python 3.8, Django 3.2, dropbox 11.36.0