xhantu <pwo...@rz-online.de> added the comment:

Confirmed for Python 2.7.1 on Ubuntu.

Problematic are the __reduce__ methods of 
multiprocessing.process.AuthenticationString and 
multiprocessing.managers.BaseProxy. Pickling of an authkey in BaseProxy is only 
done and allowed when Popen.thread_is_spawning() is True. The comments state 
this is done because of security reasons.

If you pass proxies with multiprocessing after process initialization then no 
authkey is available after unpickle, a random authkey will be used with results 
in an digest error. Because of this fallback in case no authkey is available, 
using None as authkey didn't work in my case.

This bug looks like a design flaw of multiprocessing. If security was really a 
concern, encryption should be used along with authentication for communication. 
And passing None as authkey should disable authentication as stated in the 
documentation and should not use a random authkey.

Disabling the Popen.thread_is_spawning() checks allows passing of proxies. I 
have done this during runtime by replacing the __reduce__ methods of the 
affected classes to avoid patching the installed python.

----------
nosy: +xhantu

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7503>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to