Fixed base random pass length

Removed "tunnelCheck" from legacy nx transport (not used anyway)
This commit is contained in:
Adolfo Gómez García 2020-08-19 13:44:55 +02:00
parent 416b5e738f
commit 1e42bf6cbb
4 changed files with 4 additions and 8 deletions

View File

@ -94,7 +94,7 @@ class WinRandomPassManager(WindowsOsManager):
# Generates a password that conforms to complexity
rnd = random.SystemRandom()
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))
randomPass = randomPass[:pos] + base + randomPass[pos:]
userService.storeValue('winOsRandomPass', randomPass)

View File

@ -71,7 +71,6 @@ class TSNXTransport(BaseNXTransport):
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)
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)
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:
raise transports.Transport.ValidationException(_('Must use HOST:PORT in Tunnel Server Field'))
self._tunnelServer = values['tunnelServer']
self._tunnelCheckServer = values['tunnelCheckServer']
self._tunnelCheckServer = ''
self._useEmptyCreds = gui.strToBool(values['useEmptyCreds'])
self._fixedName = values['fixedName']
self._fixedPassword = values['fixedPassword']
@ -199,8 +198,7 @@ class TSNXTransport(BaseNXTransport):
'session': self._session,
'cacheDisk': self._cacheDisk,
'cacheMem': self._cacheMem,
'tunnelServer': self._tunnelServer,
'tunnelCheckServer': self._tunnelCheckServer
'tunnelServer': self._tunnelServer
}
def getUDSTransportScript( # pylint: disable=too-many-locals

View File

@ -331,7 +331,7 @@ class RDPFile:
res += 'audiocapturemode:i:1\n'
if self.redirectWebcam:
res += 'camerastoredirect:s:*'
res += 'camerastoredirect:s:*\n'
enforcedSharesStr = ';'.join(self.enforcedShares.replace(' ', '').upper().split(',')) + ';' if self.enforcedShares else ''

View File

@ -64,8 +64,6 @@ class TRDPTransport(BaseRDPTransport):
typeName = _('RDP')
typeType = 'TSRDPTransport'
typeDescription = _('RDP Protocol. Tunneled connection.')
needsJava = True # If this transport needs java for rendering
protocol = transports.protocols.RDP
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)