summaryrefslogtreecommitdiff
path: root/tests/file_storage
AgeCommit message (Collapse)Author
2021-05-06[3.2.x] Refs CVE-2021-31542 -- Skipped mock AWS storage test on Windows.Carlton Gibson
The validate_file_name() sanitation introduced in 0b79eb36915d178aef5c6a7bbce71b1e76d376d3 correctly rejects the example file name as containing path elements on Windows. This breaks the test introduced in 914c72be2abb1c6dd860cb9279beaa66409ae1b2 to allow path components for storages that may allow them. Test is skipped pending a discussed storage refactoring to support this use-case. Backport of a708f39ce67af174df90c5b5e50ad1976cec7cb8 from main
2021-05-04[3.2.x] Fixed CVE-2021-31542 -- Tightened path & file name sanitation in ↵Florian Apolloner
file uploads.
2020-09-02Fixed #31941 -- Corrected FileField.deconstruct() with a callable storage.Brian Helba
2020-09-01Fixed CVE-2020-24583, #31921 -- Fixed permissions on intermediate-level ↵Mariusz Felisiak
static and storage directories on Python 3.7+. Thanks WhiteSage for the report.
2020-04-08Refs #28184 -- Added test for FileField storage default.Carlton Gibson
Co-authored-by: miigotu <miigotu@gmail.com>
2020-04-08Fixed #28184 -- Allowed using a callable for FileField and ImageField storage.miigotu
2019-11-06Harmonized Windows checks in tests to a single style.Jon Dufresne
2019-10-31Refs #28428 -- Made FileSystemStorage.save() to support pathlib.Path.Hasan Ramezani
2019-10-31Refs #28428 -- Added tests for using FileSystemStorage with pathlib.Path.Hasan Ramezani
2019-09-25Fixed #25598 -- Added SCRIPT_NAME prefix to STATIC_URL and MEDIA_URL set to ↵Oleg Kainov
relative paths. Thanks Florian Apolloner for reviews. Co-authored-by: Joel Dunham <Joel.Dunham@technicalsafetybc.ca>
2019-08-18Refs #28428 -- Made FileField.upload_to support pathlib.Path.Claude Paroz
2019-08-18Refs #28428 -- Added test for a callable FileField.upload_to that returns ↵Claude Paroz
pathlib.Path.
2019-08-07Corrected several typos in string literals and test names.Min ho Kim
2019-01-31Fixed #30147 -- Simplified directory creation with os.makedirs(..., ↵Jon Dufresne
exist_ok=True).
2019-01-28Fixed #30137 -- Replaced OSError aliases with the canonical OSError.Jon Dufresne
Used more specific errors (e.g. FileExistsError) as appropriate.
2018-12-31Updated test URL patterns to use path() and re_path().Tim Graham
2018-10-31Fixed #29890 -- Fixed FileSystemStorage crash if concurrent saves try to ↵Tim Graham
create the same directory. Regression in 632c4ffd9cb1da273303bcd8005fff216506c795.
2018-10-09Capitalized "Python" in docs and comments.Jon Dufresne
2018-09-28Refs #28909 -- Simplifed code using unpacking generalizations.Sergey Fedoseev
2018-07-10Fixed ResourceWarning from unclosed test files.Jon Dufresne
When running Django tests with Python warnings enabled.
2018-06-29Fixed #28144 -- Added FileSystemStorage.OS_OPEN_FLAGS to allow customization.Jon Prindiville
2018-04-27Removed urllib2 reference in file storage testsClaude Paroz
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-05-25Fixed #28224 -- Tested for SuspiciousOperation subclasses in Django's tests.Rajesh Veeranki
2017-03-01Refs #27836 -- Fixed cleanup exception in file_storage test.Vytis Banaitis
TemporaryDirectory tries to delete the directory that was already removed.
2017-02-24Fixed #27836 -- Allowed FileSystemStorage.delete() to remove directories.chillaranand
2017-02-03Fixed spelling of "nonexistent".Tim Graham
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-25Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.Tim Graham
2017-01-20Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham
These functions do nothing on Python 3.
2017-01-20Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.Tim Graham
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Refs #26058 -- Removed deprecated FileField.get_directory_name()/get_filename().Tim Graham
2017-01-17Refs #23832 -- Removed deprecated non-timezone aware Storage API.Tim Graham
2016-12-07Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.Tim Graham
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-10-27Fixed #27327 -- Simplified time zone handling by requiring pytz.Tim Graham
2016-08-09Fixed #13809 -- Made FieldFile.open() respect its mode argument.Chris Sinchok
2016-07-29Fixed #26896 -- Allowed a lazy base_url for FileSystemStorage.Tomas Pazderka
2016-06-18Refs #26772 -- Added a test for FileField reopening closed files.Paul J Stevens
Thanks Simon Charette for review.
2016-06-18Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."Tim Graham
This reverts commit 1b407050dd53e56686fdd3e168f8cac4f9be8306 as it introduces a regression in the test for refs #26772.
2016-06-17Reverted "Fixed #26398 -- Made FieldFile.open() respect its mode argument."Tim Graham
This reverts commit a52a531a8b34f049fba11c3ee7b010af7534bf90 due to regressions described in refs #26772.
2016-06-14Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File.Hugo Osvaldo Barrera
914c72be2abb1c6dd860cb9279beaa66409ae1b2 introduced a regression that causes saving a NamedTemporaryFile in a FileField to raise a SuspiciousFileOperation. To remedy this, if a File has an absolute path as a filename, use only the basename as the filename.
2016-06-06Refs #26712 -- Removed workarounds for PostgreSQL queries on TIME_ZONE changes.Simon Charette
2016-04-30Fixed #26058 -- Delegated os.path bits of FileField's filename generation to ↵Cristiano
the Storage.
2016-04-21Fixed #26495 -- Added name arg to Storage.save()'s File wrapping.Maxim Novikov
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-04-03Fixed #25905 -- Prevented leading slashes in urljoin() callsrixx
Leading slashes in the second urljoin argument will return exactly that argument, breaking FileSystemStorage.url behavior if called with a parameter with leading slashes. Also added test cases for null bytes and None. Thanks to Markus for help and review.
2016-03-23Fixed #26398 -- Made FieldFile.open() respect its mode argument.Alexey Kotlyarov