Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make sure we bail a request that has no CRLF

  • Loading branch information...
commit 3fb3cd34d4a275f4465e403aa07d007c1c50fbf6 1 parent 8178424
Tarek Ziade tarekziade authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 vaurien/protocols/redis.py
5 vaurien/protocols/redis.py
View
@@ -22,7 +22,7 @@ def _find(self, source, buffer, char, dest):
while pos == -1:
data = self._get_data(source)
if data == '':
- return -1
+ return -1, buffer
dest.sendall(data)
buffer += data
pos = buffer.find(char)
@@ -33,6 +33,9 @@ def _handle(self, source, dest, to_backend):
"""
# grabbing data
bytepos, buffer = self._find(source, '', CRLF, dest)
+ if bytepos == -1:
+ return False
+
num_args = int(buffer[1:bytepos])
for arg in range(num_args):
Please sign in to comment.
Something went wrong with that request. Please try again.