diff --git a/actor/src/udsactor/windows/store.py b/actor/src/udsactor/windows/store.py index 0154ae7d..1bf50f95 100644 --- a/actor/src/udsactor/windows/store.py +++ b/actor/src/udsactor/windows/store.py @@ -84,7 +84,7 @@ def writeConfig(config: types.ActorConfigurationType) -> None: def useOldJoinSystem() -> bool: try: - key = wreg.OpenKey(BASEKEY, 'Software\\UDSEnterpriseActor', 0, wreg.KEY_QUERY_VALUE) + key = wreg.OpenKey(BASEKEY, PATH, 0, wreg.KEY_QUERY_VALUE) try: data, _ = wreg.QueryValueEx(key, 'join') except Exception: diff --git a/server/src/uds/REST/methods/actor_v3.py b/server/src/uds/REST/methods/actor_v3.py index 6ea2ebd5..0f715cf5 100644 --- a/server/src/uds/REST/methods/actor_v3.py +++ b/server/src/uds/REST/methods/actor_v3.py @@ -379,10 +379,16 @@ class Ticket(ActorV3Action): logger.debug('Args: %s, Params: %s', self._args, self._params) try: - return ActorV3Action.actorResult(TicketStore.get(self._params['ticket'], invalidate=True)) - except TicketStore.DoesNotExist: + # Simple check that token exists + ActorToken.objects.get(token=self._params['token']) # Not assigned, because only needs check + except ActorToken.DoesNotExist: raise BlockAccess() # If too many blocks... + try: + return ActorV3Action.actorResult(TicketStore.get(self._params['ticket'], invalidate=True)) + except TicketStore.DoesNotExists: + return ActorV3Action.actorResult(error='Invalid ticket') + class Notify(ActorV3Action): name = 'notify' @@ -400,7 +406,8 @@ class Notify(ActorV3Action): # Check block manually checkBlockedIp(self._request.ip) # pylint: disable=protected-access userService = UserService.objects.get(uuid=self._params['token']) - # TODO: finish this + # TODO: finish this when needed :) + return ActorV3Action.actorResult('ok') except UserService.DoesNotExist: # For blocking attacks