Skip to content

Commit

Permalink
[2.2.x] Refs CVE-2020-13254 -- Fixed cache.tests when KEY_PREFIX is d…
Browse files Browse the repository at this point in the history
…efined.

Follow up to 2c82414.

Backport of 229c9c6 from master
  • Loading branch information
felixxm committed Jun 3, 2020
1 parent 2661c22 commit ea9bc39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/cache/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ def _perform_invalid_key_test(self, key, expected_warning):
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')

Expand Down

0 comments on commit ea9bc39

Please sign in to comment.