Merge remote-tracking branch 'origin/v3.5'

This commit is contained in:
Adolfo Gómez García 2022-02-10 13:33:50 +01:00
commit a2e5e00aa6
3 changed files with 5 additions and 4 deletions

View File

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

View File

@ -319,8 +319,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

@ -179,7 +179,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')