summaryrefslogtreecommitdiff
path: root/tests/file_storage
Commit message (Collapse)AuthorAgeFilesLines
* Fixed some typos in comments, docstrings, and tests.Liyang Zhang2023-03-201-1/+1
|
* Fixed #34192 -- Preserved callable storage when it returns default_storage.Matt Westcott2023-01-232-2/+24
|
* Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.Jarosław Wygoda2023-01-121-3/+28
|
* Fixed #26029 -- Allowed configuring custom file storage backends.Jarosław Wygoda2023-01-121-2/+46
|
* Fixed #34110 -- Added in-memory file storage.Francesco Panico2023-01-101-0/+290
| | | | | Thanks Paolo Melchiorre, Carlton Gibson, and Mariusz Felisiak for reviews.
* Refs #34110 -- Reorganized django.core.files.storage into a separate module.Francesco Panico2022-11-111-1/+1
|
* Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson2022-03-241-2/+3
| | | | | Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-1/+4
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-074-298/+364
|
* Fixed CVE-2021-45452 -- Fixed potential path traversal in storage subsystem.Florian Apolloner2022-01-042-6/+19
| | | | Thanks to Dennis Brinkrolf for the report.
* Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith2021-07-291-1/+1
| | | | appropriate.
* Fixed #28154 -- Prevented infinite loop in FileSystemStorage.save() when a ↵Jacob Walls2021-06-021-0/+11
| | | | broken symlink with the same name exists.
* Fixed #32718 -- Relaxed file name validation in FileField.Mariusz Felisiak2021-05-131-10/+76
| | | | | | | | | | | | | - 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.
* Refs CVE-2021-31542 -- Skipped mock AWS storage test on Windows.Carlton Gibson2021-05-061-0/+3
| | | | | | | | | | | 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.
* Fixed CVE-2021-31542 -- Tightened path & file name sanitation in file uploads.Florian Apolloner2021-05-041-1/+40
|
* Refs #32508 -- Raised Type/ValueError instead of using "assert" in django.core.Daniyal2021-03-191-1/+4
|
* Fixed #31941 -- Corrected FileField.deconstruct() with a callable storage.Brian Helba2020-09-021-1/+12
|
* Fixed CVE-2020-24583, #31921 -- Fixed permissions on intermediate-level ↵Mariusz Felisiak2020-09-011-6/+9
| | | | | | static and storage directories on Python 3.7+. Thanks WhiteSage for the report.
* Refs #28184 -- Added test for FileField storage default.Carlton Gibson2020-04-081-1/+5
| | | | Co-authored-by: miigotu <miigotu@gmail.com>
* Fixed #28184 -- Allowed using a callable for FileField and ImageField storage.miigotu2020-04-082-1/+56
|
* Harmonized Windows checks in tests to a single style.Jon Dufresne2019-11-061-2/+2
|
* Refs #28428 -- Made FileSystemStorage.save() to support pathlib.Path.Hasan Ramezani2019-10-311-3/+3
|
* Refs #28428 -- Added tests for using FileSystemStorage with pathlib.Path.Hasan Ramezani2019-10-311-6/+21
|
* Fixed #25598 -- Added SCRIPT_NAME prefix to STATIC_URL and MEDIA_URL set to ↵Oleg Kainov2019-09-251-1/+1
| | | | | | | | relative paths. Thanks Florian Apolloner for reviews. Co-authored-by: Joel Dunham <Joel.Dunham@technicalsafetybc.ca>
* Refs #28428 -- Made FileField.upload_to support pathlib.Path.Claude Paroz2019-08-182-0/+3
|
* Refs #28428 -- Added test for a callable FileField.upload_to that returns ↵Claude Paroz2019-08-182-0/+11
| | | | pathlib.Path.
* Corrected several typos in string literals and test names.Min ho Kim2019-08-071-2/+2
|
* Fixed #30147 -- Simplified directory creation with os.makedirs(..., ↵Jon Dufresne2019-01-311-4/+5
| | | | exist_ok=True).
* Fixed #30137 -- Replaced OSError aliases with the canonical OSError.Jon Dufresne2019-01-281-2/+2
| | | | Used more specific errors (e.g. FileExistsError) as appropriate.
* Updated test URL patterns to use path() and re_path().Tim Graham2018-12-311-2/+2
|
* Fixed #29890 -- Fixed FileSystemStorage crash if concurrent saves try to ↵Tim Graham2018-10-311-4/+4
| | | | | | create the same directory. Regression in 632c4ffd9cb1da273303bcd8005fff216506c795.
* Capitalized "Python" in docs and comments.Jon Dufresne2018-10-091-1/+1
|
* Refs #28909 -- Simplifed code using unpacking generalizations.Sergey Fedoseev2018-09-281-2/+1
|
* Fixed ResourceWarning from unclosed test files.Jon Dufresne2018-07-101-2/+4
| | | When running Django tests with Python warnings enabled.
* Fixed #28144 -- Added FileSystemStorage.OS_OPEN_FLAGS to allow customization.Jon Prindiville2018-06-291-0/+39
|
* Removed urllib2 reference in file storage testsClaude Paroz2018-04-271-2/+3
|
* Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne2017-06-011-1/+1
|
* Fixed #28224 -- Tested for SuspiciousOperation subclasses in Django's tests.Rajesh Veeranki2017-05-251-3/+3
|
* Refs #27836 -- Fixed cleanup exception in file_storage test.Vytis Banaitis2017-03-011-3/+3
| | | TemporaryDirectory tries to delete the directory that was already removed.
* Fixed #27836 -- Allowed FileSystemStorage.delete() to remove directories.chillaranand2017-02-241-0/+5
|
* Fixed spelling of "nonexistent".Tim Graham2017-02-031-6/+6
|
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-2/+2
|
* Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.Tim Graham2017-01-251-9/+8
|
* Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham2017-01-201-2/+1
| | | These functions do nothing on Python 3.
* Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.Tim Graham2017-01-201-3/+2
|
* Refs #23919 -- Removed most of remaining six usageClaude Paroz2017-01-181-5/+6
| | | | Thanks Tim Graham for the review.
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-3/+0
|
* Refs #26058 -- Removed deprecated FileField.get_directory_name()/get_filename().Tim Graham2017-01-171-27/+0
|
* Refs #23832 -- Removed deprecated non-timezone aware Storage API.Tim Graham2017-01-171-68/+1
|
* Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.Tim Graham2016-12-071-11/+11
|