issue #106: has_parent_authority should accept own context ID.

When a stream (such as unix.connect()) has its auth_id set to the
current context's, we should allow those requests too, since the request
is working with the privilege of the current context.
pull/193/head
David Wilson 6 years ago
parent 43e4f5009a
commit 504032e6e8

@ -157,8 +157,9 @@ def _unpickle_dead():
_DEAD = Dead()
def has_parent_authority(msg, _stream):
return msg.auth_id in mitogen.parent_ids
def has_parent_authority(msg, _stream=None):
return (msg.auth_id == mitogen.context_id or
msg.auth_id in mitogen.parent_ids)
def listen(obj, name, func):

Loading…
Cancel
Save