1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-12 04:58:34 +03:00

Fixed tickets auth

This commit is contained in:
Adolfo Gómez García 2018-07-18 23:11:55 +02:00
parent 4777b7e8f9
commit f177b98c78
2 changed files with 5 additions and 3 deletions

View File

@ -38,6 +38,7 @@ from uds.models import Authenticator
from uds.models import DeployedService
from uds.models import Transport
from uds.models import TicketStore
from uds.core.managers import cryptoManager
from uds.core.util.model import processUuid
from uds.core.util import tools
@ -207,7 +208,7 @@ class Tickets(Handler):
data = {
'username': username,
'password': password,
'password': cryptoManager().encrypt(password),
'realname': realname,
'groups': groups,
'auth': auth.uuid,

View File

@ -41,6 +41,7 @@ from django.template import RequestContext
from uds.core.auths.auth import webLogin, webLogout, authenticateViaCallback, authLogLogin, getUDSCookie
from uds.models import Authenticator, DeployedService
from uds.core.managers import userServiceManager
from uds.core.managers import cryptoManager
from uds.core.util import html
from uds.core.util import OsDetector
from uds.core.util.State import State
@ -57,7 +58,7 @@ import logging
logger = logging.getLogger(__name__)
__updated__ = '2018-06-27'
__updated__ = '2018-07-18'
@csrf_exempt
@ -156,7 +157,7 @@ def ticketAuth(request, ticketId):
auth = data['auth']
realname = data['realname']
servicePool = data['servicePool']
password = data['password']
password = cryptoManager().decrypt(data['password'])
transport = data['transport']
except Exception:
logger.error('Ticket stored is not valid')