forked from shaba/openuds
Fixing tickets for v3 actors && changing path for "join" registry key for join domain on 2 steps
This commit is contained in:
parent
9fd3ac280b
commit
820ba906f0
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user