summaryrefslogtreecommitdiff
path: root/tests/file_storage
AgeCommit message (Collapse)Author
2023-01-23[4.2.x] Fixed #34192 -- Preserved callable storage when it returns ↵Matt Westcott
default_storage. Backport of ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96 from main
2023-01-12Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.Jarosław Wygoda
2023-01-12Fixed #26029 -- Allowed configuring custom file storage backends.Jarosław Wygoda
2023-01-10Fixed #34110 -- Added in-memory file storage.Francesco Panico
Thanks Paolo Melchiorre, Carlton Gibson, and Mariusz Felisiak for reviews.
2022-11-11Refs #34110 -- Reorganized django.core.files.storage into a separate module.Francesco Panico
2022-03-24Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson
Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-04Fixed CVE-2021-45452 -- Fixed potential path traversal in storage subsystem.Florian Apolloner
Thanks to Dennis Brinkrolf for the report.
2021-07-29Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith
appropriate.
2021-06-02Fixed #28154 -- Prevented infinite loop in FileSystemStorage.save() when a ↵Jacob Walls
broken symlink with the same name exists.
2021-05-13Fixed #32718 -- Relaxed file name validation in FileField.Mariusz Felisiak
- Validate filename returned by FileField.upload_to() not a filename passed to the FileField.generate_filename() (upload_to() may completely ignored passed filename). - Allow relative paths (without dot segments) in the generated filename. Thanks to Jakub Kleň for the report and review. Thanks to all folks for checking this patch on existing projects. Thanks Florian Apolloner and Markus Holtermann for the discussion and implementation idea. Regression in 0b79eb36915d178aef5c6a7bbce71b1e76d376d3.
2021-05-06Refs 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.
2021-05-04Fixed CVE-2021-31542 -- Tightened path & file name sanitation in file uploads.Florian Apolloner
2021-03-19Refs #32508 -- Raised Type/ValueError instead of using "assert" in django.core.Daniyal
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