per page, with , order by , clip by
Results of 1 - 10 of about 14 for Nonce (0.063 sec.)
How to use Django's Content Security Policy 13023
How to use Django's Content Security Policy Basic config Content Security Policy (CSP) を有効にするには、Django プロジェクトで次のように設定します: Add the CSP middleware to your MIDDLEWARE setting: MIDDLEWARE = [ # ... "django.middleware.c ... _ONLY = { "default-src" : [ CSP . SELF ], # Add more directives as needed. "report-uri" : "/path/to/reports-endpoint/" , } Nonce config To use nonces in your CSP policy, beside the basic config, you need to: Include the NONCE placeholder value in the ... s.csp import CSP SECURE_CSP = { "default-src" : [ CSP . SELF ], # Allow self-hosted scripts and script tags with matching `nonce` attr. "script-src" : [ CSP . SELF , CSP . NONCE ], # Example of the less secure 'unsafe-inline' option. "style-src" : [ C ... SP . SELF , CSP . UNSAFE_INLINE ], } Add the csp() context processor to your TEMPLATES setting. This makes the generated nonce value available in the Django templates as the csp_nonce context variable: TEMPLATES = [ { "BACKEND" : "django.template.ba ...
https://man.mtool.work/django/6.1/howto/csp.html
コンテンツセキュリティポリシー 12953
コンテンツセキュリティポリシー New in Django 6.0. Content Security Policy (CSP) is a web security standard that helps prevent content injection attacks by restricting the sources from which content can be loaded. It plays an important role ... TRICT_DYNAMIC Represents 'strict-dynamic' . Allows execution of scripts loaded by a trusted script (e.g., one with a valid nonce or hash), without needing 'unsafe-inline' . UNSAFE_EVAL Represents 'unsafe-eval' . Allows use of eval() and similar JavaSc ... nts 'wasm-unsafe-eval' . Permits compilation and execution of WebAssembly code without enabling 'unsafe-eval' for scripts. NONCE Django-specific placeholder value ( "<CSP_NONCE_SENTINEL>" ) used in script-src or style-src directives to activate nonce- ... based CSP. This string is replaced at runtime by the ContentSecurityPolicyMiddleware with a secure, random nonce that is generated for each request. See detailed explanation in Nonce usage . デコレータ Django provides decorators to con ...
https://man.mtool.work/django/6.1/ref/csp.html
Django 6.1 release notes 8577
Django 6.1 release notes August 5, 2026 Welcome to Django 6.1! These release notes cover the new features , as well as some backwards incompatible changes you'll want to be aware of when upgrading from Django 6.0 or earlier. We've begun the ... the Hash index type. django.contrib.sessions SessionBase now supports boolean evaluation via __bool__() . CSP The new csp_nonce_attr template tag renders the CSP nonce attribute on <script> and <link> elements, or renders a Media object's assets with ... the nonce applied, when the csp() context processor is configured. See Nonce usage for details. A new security.W027 system check war ... ns when ContentSecurityPolicyMiddleware is enabled with CSP.NONCE in a CSP policy but django.template.context_processors.csp is not configured. CSP nonce attributes are now added on <scrip ...
https://man.mtool.work/django/6.1/releases/6.1.html
Django 1.4.11 リリースノート 8279
Django 1.4.11 リリースノート April 21, 2014 Django 1.4.11 fixes three security issues in 1.4.10. Additionally, Django's vendored version of six, django.utils.six , has been upgraded to the latest release (1.6.1). Unexpected code execution u ... rk and a system for preventing cross-site request forgery (CSRF) attacks . The CSRF-protection system is based on a random nonce sent to the client in a cookie which must be sent by the client on future requests and, in forms, a hidden value which mus ... ge is by a client which did not have a CSRF cookie, the cache framework will also cache the CSRF cookie and serve the same nonce to other anonymous clients who do not have a CSRF cookie. This can allow an attacker to obtain a valid CSRF cookie value a ...
https://man.mtool.work/django/6.1/releases/1.4.11.html
Django 1.5.6 リリースノート 8279
Django 1.5.6 リリースノート April 21, 2014 Django 1.5.6 fixes several bugs in 1.5.5, including three security issues. Unexpected code execution using reverse() Django's URL handling is based on a mapping of regex patterns (representing the ... rk and a system for preventing cross-site request forgery (CSRF) attacks . The CSRF-protection system is based on a random nonce sent to the client in a cookie which must be sent by the client on future requests and, in forms, a hidden value which mus ... ge is by a client which did not have a CSRF cookie, the cache framework will also cache the CSRF cookie and serve the same nonce to other anonymous clients who do not have a CSRF cookie. This can allow an attacker to obtain a valid CSRF cookie value a ...
https://man.mtool.work/django/6.1/releases/1.5.6.html
組み込みテンプレートタグとフィルタ 8174
組み込みテンプレートタグとフィルタ このドキュメントでは、 Django の組み込みテンプレートタグとフィルタについて述べます。 また 自動ドキュメンテーション を使えばインストールされている組み込みタグとカスタムタグのドキュメントを読めるのでお勧めで ... token このタグは CSRF の防止のために使用します。詳細は クロスサイトリクエストフォージェリ (CSRF) を参照してください。. csp_nonce_attr New in Django 6.1. When called without arguments, renders a nonce="<value>" HTML attribute when the csp() context pro ... cessor is configured, and an empty string otherwise. Use it in <script> or <link> elements to allow them under a nonce-based Content Security Policy: < script src = "/path/to/script.js" {% csp_nonce_attr %} ></ script > < link rel = "stylesh ... eet" href = "/path/to/style.css" {% csp_nonce_attr %} > When called with a Media object as the argument, renders its assets with the CSP nonce applied to each <script> ...
https://man.mtool.work/django/6.1/ref/templates/builtins.html
Django 1.6.3 リリースノート 8174
Django 1.6.3 リリースノート April 21, 2014 Django 1.6.3 fixes several bugs in 1.6.2, including three security issues, and makes one backwards-incompatible change: Unexpected code execution using reverse() Django's URL handling is based on a ... rk and a system for preventing cross-site request forgery (CSRF) attacks . The CSRF-protection system is based on a random nonce sent to the client in a cookie which must be sent by the client on future requests and, in forms, a hidden value which mus ... ge is by a client which did not have a CSRF cookie, the cache framework will also cache the CSRF cookie and serve the same nonce to other anonymous clients who do not have a CSRF cookie. This can allow an attacker to obtain a valid CSRF cookie value a ...
https://man.mtool.work/django/6.1/releases/1.6.3.html
Django 6.0 release notes 7964
Django 6.0 release notes December 3, 2025 Welcome to Django 6.0! These release notes cover the new features , as well as some backwards incompatible changes you should be aware of when upgrading from Django 5.2 or earlier. We've begun the d ... an now be enforced or monitored directly using built-in tools: headers are added via the ContentSecurityPolicyMiddleware , nonces are supported through the csp() context processor, and policies are configured using the SECURE_CSP and SECURE_CSP_REPORT ... ample: from django.utils.csp import CSP SECURE_CSP = { "default-src" : [ CSP . SELF ], "script-src" : [ CSP . SELF , CSP . NONCE ], "img-src" : [ CSP . SELF , "https:" ], } The resulting Content-Security-Policy header would be set to: default-src 'sel ... f'; script-src 'self' 'nonce-SECRET'; img-src 'self' https: To get started, follow the CSP how-to guide . For in-depth guidance, see the CSP security o ...
https://man.mtool.work/django/6.1/releases/6.0.html
Python プログラマーのための Django テンプレート言語 7929
Python プログラマーのための Django テンプレート言語 この文書は Django テンプレートシステムがどのように動作し、どのように拡張するか、技術的な観点から説明します。構文に関するリファレンスを探しているなら、 Django テンプレート言語 を参照してくだ ... csp ( request ) [ソース] New in Django 6.0. If this processor is enabled, every RequestContext will contain a variable csp_nonce , providing a securely generated, request-specific nonce suitable for use under a Content Security Policy. See CSP nonce u ...
https://man.mtool.work/django/6.1/ref/templates/api.html
ミドルウェア 7894
ミドルウェア このドキュメントでは、Djangoに付属するすべてのミドルウェアコンポーネントについて説明します。それらの使用方法や独自のミドルウェアの作成方法についての情報は、 ミドルウェア使用ガイド を参照してください。 使用できる middleware Cach ... するすべてのミドルウェアのあとに置きます。 ContentSecurityPolicyMiddleware Can be placed near the bottom, but since the csp_nonce is lazy, ensure any middleware that accesses it is positioned after, so the nonce is generated before this middleware buil ...
https://man.mtool.work/django/6.1/ref/middleware.html
PREV 1 2 NEXT