diff options
author | Nicholas Charriere <nicholas@pinterest.com> | 2016-07-27 13:16:58 -0700 |
---|---|---|
committer | Nicholas Charriere <nicholas@pinterest.com> | 2016-07-27 13:16:58 -0700 |
commit | 0a3ccc1be4cdfd9722ec8ecc8403929f8bc4daad (patch) | |
tree | b7cccc6bc4667cde4b196628ef86f575fea13027 | |
parent | feec79d7385a529e1ef79675b8c4daa4078d7398 (diff) | |
download | pymemcache-security-sanitize.tar.gz |
Make restriction wider to avoid breaking clientsecurity-sanitize
-rw-r--r-- | pymemcache/client/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pymemcache/client/base.py b/pymemcache/client/base.py index 2cf089b..ade1a18 100644 --- a/pymemcache/client/base.py +++ b/pymemcache/client/base.py @@ -72,7 +72,7 @@ def _check_key(key, key_prefix=b''): except UnicodeEncodeError: raise MemcacheIllegalInputError("No ascii key: %r" % (key,)) key = key_prefix + key - if b' ' in key or b'\r\n' in key: + if b' ' in key or b'\n' in key: raise MemcacheIllegalInputError("Key contains spaces: %r" % (key,)) if len(key) > 250: raise MemcacheIllegalInputError("Key is too long: %r" % (key,)) |