Fix #1943 - invalid session id when calling a rpc exported function from a plugin when no client is connected
This commit is contained in:
parent
6cb1fd76cc
commit
5dc6dbf216
|
@ -492,7 +492,7 @@ class RPCServer(component.Component):
|
||||||
:returns: the auth level
|
:returns: the auth level
|
||||||
:rtype: int
|
:rtype: int
|
||||||
"""
|
"""
|
||||||
if not self.listen:
|
if not self.listen or not self.is_session_valid(self.get_session_id()):
|
||||||
return AUTH_LEVEL_ADMIN
|
return AUTH_LEVEL_ADMIN
|
||||||
return self.factory.authorized_sessions[self.get_session_id()][0]
|
return self.factory.authorized_sessions[self.get_session_id()][0]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue