diff options
| author | Ram Rachum <ram@rachum.com> | 2020-02-25 15:16:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-25 14:16:19 +0100 |
| commit | 5b09354954348f1a56df32b2d7dbe074a23a4532 (patch) | |
| tree | abf67c8d665b7e97999fb5137c111a0f64f0a6a6 /tests | |
| parent | 271fdab8b78af558238df51c64b4d1c8dd0792bb (diff) | |
Fixed #31291 -- Renamed salt to mask for CSRF tokens.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/csrf_tests/test_context_processor.py | 2 | ||||
| -rw-r--r-- | tests/csrf_tests/tests.py | 2 | ||||
| -rw-r--r-- | tests/template_backends/test_dummy.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/csrf_tests/test_context_processor.py b/tests/csrf_tests/test_context_processor.py index 62e4365cd8..62bde2d085 100644 --- a/tests/csrf_tests/test_context_processor.py +++ b/tests/csrf_tests/test_context_processor.py @@ -1,5 +1,5 @@ from django.http import HttpRequest -from django.middleware.csrf import _compare_salted_tokens as equivalent_tokens +from django.middleware.csrf import _compare_masked_tokens as equivalent_tokens from django.template.context_processors import csrf from django.test import SimpleTestCase diff --git a/tests/csrf_tests/tests.py b/tests/csrf_tests/tests.py index 0a55cc307e..63cbd08c94 100644 --- a/tests/csrf_tests/tests.py +++ b/tests/csrf_tests/tests.py @@ -7,7 +7,7 @@ from django.http import HttpRequest, HttpResponse from django.middleware.csrf import ( CSRF_SESSION_KEY, CSRF_TOKEN_LENGTH, REASON_BAD_TOKEN, REASON_NO_CSRF_COOKIE, CsrfViewMiddleware, - _compare_salted_tokens as equivalent_tokens, get_token, + _compare_masked_tokens as equivalent_tokens, get_token, ) from django.test import SimpleTestCase, override_settings from django.views.decorators.csrf import csrf_exempt, requires_csrf_token diff --git a/tests/template_backends/test_dummy.py b/tests/template_backends/test_dummy.py index 5790c0604a..598397a711 100644 --- a/tests/template_backends/test_dummy.py +++ b/tests/template_backends/test_dummy.py @@ -3,7 +3,7 @@ import re from django.forms import CharField, Form, Media from django.http import HttpRequest, HttpResponse from django.middleware.csrf import ( - CsrfViewMiddleware, _compare_salted_tokens as equivalent_tokens, get_token, + CsrfViewMiddleware, _compare_masked_tokens as equivalent_tokens, get_token, ) from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.template.backends.dummy import TemplateStrings |
