summaryrefslogtreecommitdiff
path: root/tests/cache
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-03 12:37:37 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-03 13:00:37 +0200
commit229c9c6653356a0bc23846d83b2d4b5d0438a145 (patch)
tree435816c43ba3dd124ef4cc5a3d97541785123f5e /tests/cache
parent54975780ee2e4017844ecad94835fdce43d97377 (diff)
downloaddjango-229c9c6653356a0bc23846d83b2d4b5d0438a145.tar.gz
Refs CVE-2020-13254 -- Fixed cache.tests when KEY_PREFIX is defined.
Follow up to 2c82414914ae6476be5a166be9ff49c24d0d9069.
Diffstat (limited to 'tests/cache')
-rw-r--r--tests/cache/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index c5f1ad6876..1f0abc8434 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -1275,7 +1275,7 @@ class BaseMemcachedTests(BaseCacheTests):
Whilst other backends merely warn, memcached should raise for an
invalid key.
"""
- msg = expected_warning.replace(key, ':1:%s' % key)
+ msg = expected_warning.replace(key, cache.make_key(key))
with self.assertRaisesMessage(InvalidCacheKey, msg):
cache.set(key, 'value')