diff options
| author | Tim Graham <timograham@gmail.com> | 2015-09-05 10:31:09 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-23 19:31:11 -0400 |
| commit | e6cfa08f2d478cb962528188dff5cf4daf5e5f9b (patch) | |
| tree | 98ac349152a008c1c2e4e6c9d6d04bc92481484c /django | |
| parent | 9114fe8adabe626619665c9853ba952798da5530 (diff) | |
Refs #22804 -- Made an unsafe value of 'sep' in Signer an exception.
Per deprecation timeline.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/signing.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/core/signing.py b/django/core/signing.py index 61b43316db..9d4c665ad2 100644 --- a/django/core/signing.py +++ b/django/core/signing.py @@ -40,13 +40,11 @@ import datetime import json import re import time -import warnings import zlib from django.conf import settings from django.utils import baseconv from django.utils.crypto import constant_time_compare, salted_hmac -from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_bytes, force_str, force_text from django.utils.module_loading import import_string @@ -158,8 +156,10 @@ class Signer(object): self.key = key or settings.SECRET_KEY self.sep = force_str(sep) if _SEP_UNSAFE.match(self.sep): - warnings.warn('Unsafe Signer separator: %r (cannot be empty or consist of only A-z0-9-_=)' % sep, - RemovedInDjango110Warning) + raise ValueError( + 'Unsafe Signer separator: %r (cannot be empty or consist of ' + 'only A-z0-9-_=)' % sep, + ) self.salt = force_str(salt or '%s.%s' % (self.__class__.__module__, self.__class__.__name__)) |
