Commit 8b9670a5 authored by Ophir LOJKINE's avatar Ophir LOJKINE Committed by oroulet

Don't return AccessDenied on FindServers requests

Fixes #236
parent bfd3b206
......@@ -147,10 +147,12 @@ class UaProcessor:
async def _process_message(self, typeid, requesthdr, seqhdr, body):
if typeid in [ua.NodeId(ua.ObjectIds.CreateSessionRequest_Encoding_DefaultBinary),
ua.NodeId(ua.ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary),
ua.NodeId(ua.ObjectIds.FindServersRequest_Encoding_DefaultBinary),
ua.NodeId(ua.ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary)]:
# The connection is first created without a user being attached, and then during activation the
user = None
elif self.session is None:
_logger.warning("Received a request of type %d without an existing session", typeid.Identifier)
raise ua.uaerrors.BadUserAccessDenied
else:
user = self.session.user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment