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
bae66e75
Kaydet (Commit)
bae66e75
authored
Ock 22, 2019
tarafından
Carlton Gibson
Kaydeden (comit)
Tim Graham
Ock 30, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #30091 -- Doc'd middleware ordering requirements with CSRF_USE_SESSIONS.
üst
7e6b214e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
middleware.txt
docs/ref/middleware.txt
+7
-2
settings.txt
docs/ref/settings.txt
+6
-0
No files found.
docs/ref/middleware.txt
Dosyayı görüntüle @
bae66e75
...
@@ -426,6 +426,10 @@ Here are some hints about the ordering of various Django middleware classes:
...
@@ -426,6 +426,10 @@ Here are some hints about the ordering of various Django middleware classes:
#. :class:`~django.contrib.sessions.middleware.SessionMiddleware`
#. :class:`~django.contrib.sessions.middleware.SessionMiddleware`
Before any middleware that may raise an an exception to trigger an error
view (such as :exc:`~django.core.exceptions.PermissionDenied`) if you're
using :setting:`CSRF_USE_SESSIONS`.
After ``UpdateCacheMiddleware``: Modifies ``Vary`` header.
After ``UpdateCacheMiddleware``: Modifies ``Vary`` header.
#. :class:`~django.middleware.http.ConditionalGetMiddleware`
#. :class:`~django.middleware.http.ConditionalGetMiddleware`
...
@@ -450,13 +454,14 @@ Here are some hints about the ordering of various Django middleware classes:
...
@@ -450,13 +454,14 @@ Here are some hints about the ordering of various Django middleware classes:
Close to the top: it redirects when :setting:`APPEND_SLASH` or
Close to the top: it redirects when :setting:`APPEND_SLASH` or
:setting:`PREPEND_WWW` are set to ``True``.
:setting:`PREPEND_WWW` are set to ``True``.
After ``SessionMiddleware`` if you're using :setting:`CSRF_USE_SESSIONS`.
#. :class:`~django.middleware.csrf.CsrfViewMiddleware`
#. :class:`~django.middleware.csrf.CsrfViewMiddleware`
Before any view middleware that assumes that CSRF attacks have been dealt
Before any view middleware that assumes that CSRF attacks have been dealt
with.
with.
It must come after ``SessionMiddleware`` if you're using
After ``SessionMiddleware`` if you're using :setting:`CSRF_USE_SESSIONS`.
:setting:`CSRF_USE_SESSIONS`.
#. :class:`~django.contrib.auth.middleware.AuthenticationMiddleware`
#. :class:`~django.contrib.auth.middleware.AuthenticationMiddleware`
...
...
docs/ref/settings.txt
Dosyayı görüntüle @
bae66e75
...
@@ -403,6 +403,12 @@ Storing the CSRF token in a cookie (Django's default) is safe, but storing it
...
@@ -403,6 +403,12 @@ Storing the CSRF token in a cookie (Django's default) is safe, but storing it
in the session is common practice in other web frameworks and therefore
in the session is common practice in other web frameworks and therefore
sometimes demanded by security auditors.
sometimes demanded by security auditors.
Since the :ref:`default error views <error-views>` require the CSRF token,
:class:`~django.contrib.sessions.middleware.SessionMiddleware` must appear in
:setting:`MIDDLEWARE` before any middleware that may raise an exception to
trigger an error view (such as :exc:`~django.core.exceptions.PermissionDenied`)
if you're using ``CSRF_USE_SESSIONS``. See :ref:`middleware-ordering`.
.. setting:: CSRF_FAILURE_VIEW
.. setting:: CSRF_FAILURE_VIEW
``CSRF_FAILURE_VIEW``
``CSRF_FAILURE_VIEW``
...
...
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