From 229c9c6653356a0bc23846d83b2d4b5d0438a145 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 3 Jun 2020 12:37:37 +0200 Subject: [PATCH] Refs CVE-2020-13254 -- Fixed cache.tests when KEY_PREFIX is defined. Follow up to 2c82414914ae6476be5a166be9ff49c24d0d9069. --- tests/cache/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cache/tests.py b/tests/cache/tests.py index c5f1ad68765..1f0abc84348 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')