diff --git a/server/src/server/settings.py.sample b/server/src/server/settings.py.sample index be0945677..17bcc0162 100644 --- a/server/src/server/settings.py.sample +++ b/server/src/server/settings.py.sample @@ -145,6 +145,7 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', + 'uds.core.util.request.GlobalRequestMiddleware', ) SESSION_EXPIRE_AT_BROWSER_CLOSE = True diff --git a/server/src/uds/auths/InternalDB/Authenticator.py b/server/src/uds/auths/InternalDB/Authenticator.py index bec8cd1b3..9c5a8dfb2 100644 --- a/server/src/uds/auths/InternalDB/Authenticator.py +++ b/server/src/uds/auths/InternalDB/Authenticator.py @@ -83,6 +83,8 @@ class InternalDBAuth(Authenticator): try: usr = auth.users.get(name=username, state=State.ACTIVE) usr.id = None + if usr.real_name.strip() == '': + usr.real_name = usr.name usr.name = newUsername usr.save() except: diff --git a/server/src/uds/core/util/connection.py b/server/src/uds/core/util/connection.py index 436049c4e..5ff91af41 100644 --- a/server/src/uds/core/util/connection.py +++ b/server/src/uds/core/util/connection.py @@ -30,6 +30,7 @@ ''' @author: Adolfo Gómez, dkmaster at dkmon dot com ''' +from __future__ import unicode_literals import logging import socket @@ -39,7 +40,7 @@ logger = logging.getLogger(__name__) def testServer(host, port, timeOut = 4): try: logger.debug('Checking connection to {0}:{1} with {2} seconds timeout'.format(host, port, timeOut)) - sock = socket.create_connection((host, port), timeOut) + sock = socket.create_connection((host, int(port)), timeOut) sock.close() except Exception, e: logger.debug('Exception checking {0}:{1} with {2} timeout: {3}'.format(host, port, timeOut, e)) diff --git a/server/src/uds/transports/HTML5RDP/HTML5RDP.py b/server/src/uds/transports/HTML5RDP/HTML5RDP.py index 5e98f0f5f..0defb893f 100644 --- a/server/src/uds/transports/HTML5RDP/HTML5RDP.py +++ b/server/src/uds/transports/HTML5RDP/HTML5RDP.py @@ -57,7 +57,7 @@ class HTML5RDPTransport(Transport): iconFile = 'rdp.png' needsJava = False # If this transport needs java for rendering - guacamoleServer = gui.TextField(label=_('Tunnel Server'), order = 1, tooltip = _('Host of the tunnel server (use http/http & port if needed)'), defvalue = 'https://', length = 64) + guacamoleServer = gui.TextField(label=_('Tunnel Server'), order = 1, tooltip = _('Host of the tunnel server (use http/https & port if needed)'), defvalue = 'https://', length = 64) allowRequestsFrom = gui.TextField(label=_('Allowed hosts'), order = 1, tooltip = _('Hosts allowed to ask for credentials for users (use * for all host, but not recommended). Comma separated list'), defvalue = '*', length = 256) useEmptyCreds = gui.CheckBoxField(label = _('Empty creds'), order = 2, tooltip = _('If checked, the credentials used to connect will be emtpy'))