1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-08 21:18:00 +03:00

* Fixed connection unicode compatibility

* Fixed Internal DB auth literal
* Fixed sample settings to include "request" logger
This commit is contained in:
Adolfo Gómez 2013-04-18 10:10:31 +00:00
parent 38dd6e23c8
commit c2a5b9ee50
4 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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:

View File

@ -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))

View File

@ -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'))