mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-11 00:58:39 +03:00
Fixes for passwords
This commit is contained in:
parent
fbbdc529fe
commit
4777b7e8f9
@ -36,6 +36,7 @@ from django.http import HttpResponse
|
||||
from uds.models import TicketStore
|
||||
from uds.core.util import net
|
||||
from uds.core.auths import auth
|
||||
from uds.core.managers import cryptoManager
|
||||
|
||||
import logging
|
||||
|
||||
@ -57,6 +58,7 @@ def guacamole(request, tunnelId):
|
||||
|
||||
try:
|
||||
val = TicketStore.get(tunnelId, invalidate=False)
|
||||
val['password'] = cryptoManager().decrypt(val['password'])
|
||||
|
||||
response = dict2resp(val)
|
||||
except Exception:
|
||||
|
@ -44,6 +44,7 @@ from uds.core.transports.BaseTransport import TUNNELED_GROUP
|
||||
from uds.core.transports import protocols
|
||||
from uds.core.util import connection
|
||||
from uds.core.util import OsDetector
|
||||
from uds.core.managers import cryptoManager
|
||||
from uds.models import TicketStore
|
||||
|
||||
import logging
|
||||
@ -194,7 +195,7 @@ class HTML5RDPTransport(Transport):
|
||||
'protocol': 'rdp',
|
||||
'hostname': ip,
|
||||
'username': username,
|
||||
'password': password,
|
||||
'password': cryptoManager().encrypt(password),
|
||||
'ignore-cert': 'true',
|
||||
'security': self.security.value,
|
||||
'drive-path': '/share/{}'.format(user.uuid),
|
||||
|
@ -27,8 +27,8 @@ def execRdesktop(rdesktop):
|
||||
import subprocess # @Reimport
|
||||
params = [rdesktop] + {m.r.as_rdesktop_params} + ['{m.r.address}'] # @UndefinedVariable
|
||||
p = subprocess.Popen(params, stdin=subprocess.PIPE)
|
||||
if '{m.password}' != '':
|
||||
p.stdin.write('{m.password}')
|
||||
if """{m.password}""" != '':
|
||||
p.stdin.write("""{m.password}""")
|
||||
p.stdin.close()
|
||||
tools.addTaskToWait(p)
|
||||
|
||||
|
@ -29,7 +29,7 @@ def execRdesktop(rdesktop, port):
|
||||
params = [rdesktop] + {m.r.as_rdesktop_params} + ['127.0.0.1:{{}}'.format(port)] # @UndefinedVariable
|
||||
p = subprocess.Popen(params, stdin=subprocess.PIPE)
|
||||
if {m.hasCredentials}: # @UndefinedVariable
|
||||
p.stdin.write('{m.password}')
|
||||
p.stdin.write("""{m.password}""")
|
||||
p.stdin.close()
|
||||
tools.addTaskToWait(p)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user