forked from shaba/openuds
Fixed base random pass length
Removed "tunnelCheck" from legacy nx transport (not used anyway)
This commit is contained in:
parent
416b5e738f
commit
1e42bf6cbb
@ -94,7 +94,7 @@ class WinRandomPassManager(WindowsOsManager):
|
|||||||
# Generates a password that conforms to complexity
|
# Generates a password that conforms to complexity
|
||||||
rnd = random.SystemRandom()
|
rnd = random.SystemRandom()
|
||||||
base = ''.join(rnd.choice(v) for v in (string.ascii_lowercase, string.ascii_uppercase, string.digits)) + rnd.choice('.+-')
|
base = ''.join(rnd.choice(v) for v in (string.ascii_lowercase, string.ascii_uppercase, string.digits)) + rnd.choice('.+-')
|
||||||
randomPass = ''.join(rnd.choice(string.ascii_letters + string.digits) for _ in range(13))
|
randomPass = ''.join(rnd.choice(string.ascii_letters + string.digits) for _ in range(12))
|
||||||
pos = rnd.randrange(0, len(randomPass))
|
pos = rnd.randrange(0, len(randomPass))
|
||||||
randomPass = randomPass[:pos] + base + randomPass[pos:]
|
randomPass = randomPass[:pos] + base + randomPass[pos:]
|
||||||
userService.storeValue('winOsRandomPass', randomPass)
|
userService.storeValue('winOsRandomPass', randomPass)
|
||||||
|
@ -71,7 +71,6 @@ class TSNXTransport(BaseNXTransport):
|
|||||||
group = transports.TUNNELED_GROUP
|
group = transports.TUNNELED_GROUP
|
||||||
|
|
||||||
tunnelServer = gui.TextField(label=_('Tunnel server'), order=1, tooltip=_('IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB)
|
tunnelServer = gui.TextField(label=_('Tunnel server'), order=1, tooltip=_('IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB)
|
||||||
tunnelCheckServer = gui.TextField(label=_('Tunnel host check'), order=2, tooltip=_('If not empty, this server will be used to check if service is running before assigning it to user. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB)
|
|
||||||
|
|
||||||
useEmptyCreds = gui.CheckBoxField(label=_('Empty creds'), order=3, tooltip=_('If checked, the credentials used to connect will be emtpy'), tab=gui.CREDENTIALS_TAB)
|
useEmptyCreds = gui.CheckBoxField(label=_('Empty creds'), order=3, tooltip=_('If checked, the credentials used to connect will be emtpy'), tab=gui.CREDENTIALS_TAB)
|
||||||
fixedName = gui.TextField(label=_('Username'), order=4, tooltip=_('If not empty, this username will be always used as credential'), tab=gui.CREDENTIALS_TAB)
|
fixedName = gui.TextField(label=_('Username'), order=4, tooltip=_('If not empty, this username will be always used as credential'), tab=gui.CREDENTIALS_TAB)
|
||||||
@ -159,7 +158,7 @@ class TSNXTransport(BaseNXTransport):
|
|||||||
if values['tunnelServer'].find(':') == -1:
|
if values['tunnelServer'].find(':') == -1:
|
||||||
raise transports.Transport.ValidationException(_('Must use HOST:PORT in Tunnel Server Field'))
|
raise transports.Transport.ValidationException(_('Must use HOST:PORT in Tunnel Server Field'))
|
||||||
self._tunnelServer = values['tunnelServer']
|
self._tunnelServer = values['tunnelServer']
|
||||||
self._tunnelCheckServer = values['tunnelCheckServer']
|
self._tunnelCheckServer = ''
|
||||||
self._useEmptyCreds = gui.strToBool(values['useEmptyCreds'])
|
self._useEmptyCreds = gui.strToBool(values['useEmptyCreds'])
|
||||||
self._fixedName = values['fixedName']
|
self._fixedName = values['fixedName']
|
||||||
self._fixedPassword = values['fixedPassword']
|
self._fixedPassword = values['fixedPassword']
|
||||||
@ -199,8 +198,7 @@ class TSNXTransport(BaseNXTransport):
|
|||||||
'session': self._session,
|
'session': self._session,
|
||||||
'cacheDisk': self._cacheDisk,
|
'cacheDisk': self._cacheDisk,
|
||||||
'cacheMem': self._cacheMem,
|
'cacheMem': self._cacheMem,
|
||||||
'tunnelServer': self._tunnelServer,
|
'tunnelServer': self._tunnelServer
|
||||||
'tunnelCheckServer': self._tunnelCheckServer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def getUDSTransportScript( # pylint: disable=too-many-locals
|
def getUDSTransportScript( # pylint: disable=too-many-locals
|
||||||
|
@ -331,7 +331,7 @@ class RDPFile:
|
|||||||
res += 'audiocapturemode:i:1\n'
|
res += 'audiocapturemode:i:1\n'
|
||||||
|
|
||||||
if self.redirectWebcam:
|
if self.redirectWebcam:
|
||||||
res += 'camerastoredirect:s:*'
|
res += 'camerastoredirect:s:*\n'
|
||||||
|
|
||||||
enforcedSharesStr = ';'.join(self.enforcedShares.replace(' ', '').upper().split(',')) + ';' if self.enforcedShares else ''
|
enforcedSharesStr = ';'.join(self.enforcedShares.replace(' ', '').upper().split(',')) + ';' if self.enforcedShares else ''
|
||||||
|
|
||||||
|
@ -64,8 +64,6 @@ class TRDPTransport(BaseRDPTransport):
|
|||||||
typeName = _('RDP')
|
typeName = _('RDP')
|
||||||
typeType = 'TSRDPTransport'
|
typeType = 'TSRDPTransport'
|
||||||
typeDescription = _('RDP Protocol. Tunneled connection.')
|
typeDescription = _('RDP Protocol. Tunneled connection.')
|
||||||
needsJava = True # If this transport needs java for rendering
|
|
||||||
protocol = transports.protocols.RDP
|
|
||||||
group = transports.TUNNELED_GROUP
|
group = transports.TUNNELED_GROUP
|
||||||
|
|
||||||
tunnelServer = gui.TextField(label=_('Tunnel server'), order=1, tooltip=_('IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB)
|
tunnelServer = gui.TextField(label=_('Tunnel server'), order=1, tooltip=_('IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB)
|
||||||
|
Loading…
Reference in New Issue
Block a user