1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-12 09:17:56 +03:00

Fixed HTML5 transports and advanced tab translation for label

This commit is contained in:
Adolfo Gómez García 2022-02-10 13:32:05 +01:00
parent 3dd73f4723
commit 5ce7ddc3a7
3 changed files with 5 additions and 4 deletions

View File

@ -167,7 +167,7 @@ class Transports(ModelHandler):
),
'type': 'text',
'order': 201,
'tab': gui.ADVANCED_TAB,
'tab': ugettext(gui.ADVANCED_TAB),
},
)

View File

@ -320,8 +320,8 @@ class HTML5RDPTransport(transports.Transport):
def initialize(self, values: 'Module.ValuesType'):
if not values:
return
# Strip spaces
self.guacamoleServer.value = self.guacamoleServer.value.strip()
# Strip spaces and all trailing '/'
self.guacamoleServer.value = self.guacamoleServer.value.strip().rstrip('/')
if self.guacamoleServer.value[0:4] != 'http':
raise transports.Transport.ValidationException(
_('The server must be http or https')

View File

@ -180,7 +180,8 @@ class HTML5VNCTransport(transports.Transport):
if not values:
return
# Strip spaces
self.guacamoleServer.value = self.guacamoleServer.value.strip()
# Remove trailing / (one or more) from url if it exists from "guacamoleServer" field
self.guacamoleServer.value = self.guacamoleServer.value.strip().rstrip('/')
if self.guacamoleServer.value[0:4] != 'http':
raise transports.Transport.ValidationException(
_('The server must be http or https')