mirror of
https://github.com/itsdave-de/msp_remoteadmin.git
synced 2025-05-06 12:25:12 +02:00
set lower only to protocol string
This commit is contained in:
parent
2f214c7bb1
commit
5fbd8dc13b
@ -40,7 +40,7 @@ def create_session(name, protocol):
|
||||
ip_doc = frappe.get_doc('IP Address', doc.get('main_ip'))
|
||||
ip_address = ip_doc.ip_address
|
||||
|
||||
uri = f"{protocol}://{ip_address}{':' + str(PROTOCOL_PORT[protocol])}"
|
||||
uri = f"{protocol.lower()}://{ip_address}{':' + str(PROTOCOL_PORT[protocol])}"
|
||||
if protocol == 'RDP':
|
||||
uri = f"{uri}/?ignore-cert=true&disable-audio=true{'&username=' + username if username else ''}{'&password=' + password if password else ''}{'&domain=' + domain if domain else ''}"
|
||||
elif protocol == 'SSH':
|
||||
@ -51,5 +51,5 @@ def create_session(name, protocol):
|
||||
params.append(f"password={password}")
|
||||
if params:
|
||||
uri = f"{uri}/?{'&'.join(params)}"
|
||||
url = f'{guaca_config.guacamole_server}/?#/?token={token}&quickconnect={urllib.parse.quote_plus(uri).lower()}'
|
||||
url = f'{guaca_config.guacamole_server}/?#/?token={token}&quickconnect={urllib.parse.quote_plus(uri)}'
|
||||
return url
|
||||
|
Loading…
x
Reference in New Issue
Block a user