[Bug 1492604] Re: python3-memcached uses invalid string handling
ChristianEhrhardt
1492604 at bugs.launchpad.net
Mon Oct 5 14:08:51 UTC 2015
As described by Robie versions are:
precise: n/a
trusty: n/a
vivid: 1.53+2014.06.08.git.918
wily: 1.56-1
To reproduce the issue I installed the tool and wrote a minimal test
wrapper based on online examples - and hey it is fairly short (not even
worth an attachment).
#!/usr/bin/env python3
import memcache
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
mc.set("some_key", "Some value")
Leads to:
Traceback (most recent call last):
File "./test-memcache-simple.py", line 4, in <module>
mc.set("some_key", "Some value")
File "/usr/lib/python3/dist-packages/memcache.py", line 651, in set
return self._set("set", key, val, time, min_compress_len)
File "/usr/lib/python3/dist-packages/memcache.py", line 929, in _set
return _unsafe_set()
File "/usr/lib/python3/dist-packages/memcache.py", line 919, in _unsafe_set
server.send_cmd(fullcmd)
File "/usr/lib/python3/dist-packages/memcache.py", line 1289, in send_cmd
self.socket.sendall(cmd + '\r\n')
TypeError: 'str' does not support the buffer interface
That allows us to verify any patches and also wily easily.
And there it works.
Bug affects:
precise: n/a
trusty: n/a
vivid: yes
wily: no
This also matches the versions as the vivid version is 1.53... and the fix went into 1.54.
The individual patch to cherry pick would be this:
https://github.com/gilgamezh/python-memcached/commit/64fbacf99ebebba2b705f930608a00b9a18101a2
The patch is fairly simple and would only modify one file at
/usr/lib/python3/dist-packages/memcache.py
The patch as-is does not cleanly apply due to other changes in 1.54
missing.
Semantically the patch still applies, it is just other noise.
So it should be easily be backported, here a suggestion as patch.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1492604
Title:
python3-memcached uses invalid string handling
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-memcache/+bug/1492604/+subscriptions
More information about the Ubuntu-server-bugs
mailing list