Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
22aab866
Kaydet (Commit)
22aab866
authored
Şub 06, 2019
tarafından
Himanshu Lakhara
Kaydeden (comit)
Tim Graham
Şub 08, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #30004 -- Changed default FILE_UPLOAD_PERMISSION to 0o644.
üst
e7fd69d0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
13 deletions
+18
-13
global_settings.py
django/conf/global_settings.py
+1
-1
checklist.txt
docs/howto/deployment/checklist.txt
+0
-10
settings.txt
docs/ref/settings.txt
+5
-1
3.0.txt
docs/releases/3.0.txt
+11
-0
tests.py
tests/test_utils/tests.py
+1
-1
No files found.
django/conf/global_settings.py
Dosyayı görüntüle @
22aab866
...
...
@@ -304,7 +304,7 @@ FILE_UPLOAD_TEMP_DIR = None
# The numeric mode to set newly-uploaded files to. The value should be a mode
# you'd pass directly to os.chmod; see https://docs.python.org/library/os.html#files-and-directories.
FILE_UPLOAD_PERMISSIONS
=
None
FILE_UPLOAD_PERMISSIONS
=
0
o644
# The numeric mode to assign to newly-created directories, when uploading files.
# The value should be a mode as you'd pass to os.chmod;
...
...
docs/howto/deployment/checklist.txt
Dosyayı görüntüle @
22aab866
...
...
@@ -154,16 +154,6 @@ server never attempts to interpret them. For instance, if a user uploads a
Now is a good time to check your backup strategy for these files.
:setting:`FILE_UPLOAD_PERMISSIONS`
----------------------------------
With the default file upload settings, files smaller than
:setting:`FILE_UPLOAD_MAX_MEMORY_SIZE` may be stored with a different mode
than larger files as described in :setting:`FILE_UPLOAD_PERMISSIONS`.
Setting :setting:`FILE_UPLOAD_PERMISSIONS` ensures all files are uploaded with
the same permissions.
HTTPS
=====
...
...
docs/ref/settings.txt
Dosyayı görüntüle @
22aab866
...
...
@@ -1484,7 +1484,7 @@ This value mirrors the functionality and caveats of the
``FILE_UPLOAD_PERMISSIONS``
---------------------------
Default: ``
None
``
Default: ``
0o644
``
The numeric mode (i.e. ``0o644``) to set newly uploaded files to. For
more information about what these modes mean, see the documentation for
...
...
@@ -1511,6 +1511,10 @@ when using the :djadmin:`collectstatic` management command. See
way that modes must be specified. If you try to use ``644``, you'll
get totally incorrect behavior.
.. versionchanged:: 3.0
In older versions, the default value is ``None``.
.. setting:: FILE_UPLOAD_TEMP_DIR
``FILE_UPLOAD_TEMP_DIR``
...
...
docs/releases/3.0.txt
Dosyayı görüntüle @
22aab866
...
...
@@ -284,6 +284,17 @@ Django 3.0, we're removing these APIs at this time.
* ``django.utils.safestring.SafeBytes`` - Unused since Django 2.0.
New default value for the ``FILE_UPLOAD_PERMISSIONS`` setting
-------------------------------------------------------------
In older versions, the :setting:`FILE_UPLOAD_PERMISSIONS` setting defaults to
``None``. With the default :setting:`FILE_UPLOAD_HANDLERS`, this results in
uploaded files having different permissions depending on their size and which
upload handler is used.
``FILE_UPLOAD_PERMISSION`` now defaults to ``0o644`` to avoid this
inconsistency.
Miscellaneous
-------------
...
...
tests/test_utils/tests.py
Dosyayı görüntüle @
22aab866
...
...
@@ -1099,7 +1099,7 @@ class OverrideSettingsTests(SimpleTestCase):
the file_permissions_mode attribute of
django.core.files.storage.default_storage.
"""
self
.
assert
IsNone
(
default_storage
.
file_permissions_mode
)
self
.
assert
Equal
(
default_storage
.
file_permissions_mode
,
0
o644
)
with
self
.
settings
(
FILE_UPLOAD_PERMISSIONS
=
0
o777
):
self
.
assertEqual
(
default_storage
.
file_permissions_mode
,
0
o777
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment