1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-24 21:34:41 +03:00

Merge remote-tracking branch 'origin/v3.5'

This commit is contained in:
Adolfo Gómez García 2022-02-23 21:57:08 +01:00
commit afd653422e
3 changed files with 9 additions and 10 deletions

View File

@ -276,6 +276,8 @@ class Initialize(ActorV3Action):
# Valid actor token, now validate access allowed. That is, look for a valid mac from the ones provided.
try:
# Enforce lowecase ids for sqlite
idsList = [i.lower() for i in idsList]
# Set full filter
dbFilter = dbFilter.filter(
unique_id__in=idsList,
@ -454,6 +456,9 @@ class LoginLogout(ActorV3Action):
x['mac'] for x in self._params['id']
][:10]
# Enforce lowercase for idList
idsList = [x.lower() for x in idsList]
validId: typing.Optional[str] = service.getValidId(idsList)
# Must be valid
@ -664,6 +669,9 @@ class Unmanaged(ActorV3Action):
][:10]
validId: typing.Optional[str] = service.getValidId(idsList)
# enforce lowercase idsList
idsList = [i.lower() for i in idsList]
# Check if there is already an assigned user service
# To notify it logout
userService: typing.Optional[UserService]

View File

@ -113,15 +113,6 @@ def authCallback_stage2(
params: typing.Dict[str, typing.Any] = ticket['params']
auth_uuid: str = ticket['auth']
authenticator = Authenticator.objects.get(uuid=auth_uuid)
params['_request'] = request
# params['_session'] = request.session
# params['_user'] = request.user
logger.debug(
'Request session:%s -> %s, %s',
request.ip,
request.session.keys(),
request.session.session_key,
)
result = authenticateViaCallback(authenticator, params, request)

View File

@ -37,7 +37,7 @@ from django.http import HttpRequest, HttpResponse, JsonResponse, HttpResponseRed
from django.views.decorators.cache import never_cache
from django.urls import reverse
from uds.core.util.request import ExtendedHttpRequest, ExtendedHttpRequestWithUser
from uds.core.auths import auth
from uds.core.auths import auth, exceptions
from uds.web.util import errors
from uds.web.forms.LoginForm import LoginForm