| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
support in file storage per deprecation timeline.
|
| |
|
|
|
|
|
| |
Forwardport of ae1d663b7913f6da233c55409c4973248372d302
from stable/1.8.x plus more.
|
| |
|
| |
|
|
|
|
| |
TemporaryFileUploadHandler.new_file
|
| |
|
|
|
|
|
|
| |
buffers that Pillow fails to parse.
Thanks Steve Kossouho for the report and original patch.
|
| |
|
|
|
|
| |
value for broken images
|
| |
|
|
|
|
| |
Storage.
|
|
|
|
| |
support an old Python?).
|
|
|
|
| |
contains unicode.
|
|
|
|
|
|
|
|
|
|
|
| |
forwards compatible"
This reverts commit f36151ed169813f2873e13ca9de616cfa4095321.
Adding kwargs to deconstructed objects does not achieve useful
forward-compatibility in general, since additional arguments are silently
dropped rather than having their intended effect. In fact, it can make the
failure more difficult to diagnose. Thanks Shai Berger for discussion.
|
|
|
|
| |
compatible
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a test for the condition safe_join is designed to prevent.
Previously, a generic ValueError was raised. It was impossible to tell
an intentional exception raised to implement safe_join's contract from
an unintentional exception caused by incorrect inputs or unexpected
conditions. That resulted in bizarre exception catching patterns, which
this patch removes.
Since safe_join is a private API and since the change is unlikely to
create security issues for users who use it anyway -- at worst, an
uncaught SuspiciousFileOperation exception will bubble up -- it isn't
documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
newlines.
The following are recognized as ending a line: the Unix end-of-line
convention '\n', the Windows convention '\r\n', and the old
Macintosh convention '\r'.
http://www.python.org/dev/peps/pep-0278
Thanks tchaumeny for review.
|
| |
|
|
|
|
|
|
| |
duplicate file names.
This is a security fix. Disclosure following shortly.
|
|
|
|
|
|
|
|
| |
manager. Refs #22680.
This fixes a regression on Windows introduced by b7de5f5.
Thanks Tim Graham for the report and review.
|
|
|
|
|
|
|
| |
This patch is two-fold; first it ensure that Django does close everything in
request.FILES at the end of the request and secondly the storage system should
no longer close any files during save, it's up to the caller to handle that --
or let Django close the files at the end of the request.
|
|
|
|
|
|
|
| |
FileSystemStorage
Thanks David Fischer for the report and Moayad Mardini for the
review.
|
| |
|
| |
|
|
|
|
| |
deconstructible and tested.
|
|
|
|
|
|
| |
918a16bc4c099ab0cae72a231de3e99e2a9d02cb.
Refs #22307.
|
|
|
|
|
|
|
|
|
| |
class.
Added condition to prevent checking the existence of a file name of a
file like object when the name attribute is None. This is necessary
because a SpooledTemporaryFile won't exist on the file system or have a
name until it has reached its max_size. Also added tests.
|
|
|
|
| |
refs #19934.
|
|
|
|
|
|
|
| |
Some platforms with os.name == 'posix' do not have the
fcntl module, e.g. AppEngine.
refs #19373.
|
|
|
|
| |
Thanks Piotr Kasprzyk for help with the patch.
|
|
|
|
|
|
|
|
|
| |
iteration.
Due to a mixup between text and bytes, iteration over
a File instance was broken under Python 3.
Thanks to trac user pdewacht for the report and patch.
|
|
|
|
|
|
|
|
|
| |
TemporaryUploadedFile and MemoryUploadedFile.
This provides better backwards compatibility for those constructing these
objects manually.
Refs #13721.
|
|
|
|
|
|
|
|
|
|
|
| |
to ctypes
There wasn't any file locking under Windows unless PyWin32 was
installed. This removes that (undocumented) dependency by using ctypes
instead.
Thanks to Anatoly Techtonik for writing the ctypes port upon which this
is based.
|
|
|
|
|
|
| |
in favor of import_string().
Thanks Aymeric Augustin for the suggestion and review.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
for static directories.
Previously when collecting static files, the directories would receive permissions
from the global umask. Now the default permission comes from FILE_UPLOAD_DIRECTORY_PERMISSIONS
and there's an option to specify the permissions by subclassing any of the
static files storage classes and setting the directory_permissions_mode parameter.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
for static files.
Previously, when collecting static files, the files would receive permission
from FILE_UPLOAD_PERMISSIONS. Now, there's an option to give different
permission from uploaded files permission by subclassing any of the static
files storage classes and setting the file_permissions_mode parameter.
Thanks dblack at atlassian.com for the suggestion.
|
| |
|
| |
|
| |
|