mirror of
https://github.com/itsdave-de/msp_remoteadmin.git
synced 2025-05-07 12:45:13 +02:00
fix correct uri parameters
This commit is contained in:
parent
2797068e9f
commit
2f214c7bb1
@ -43,7 +43,13 @@ def create_session(name, protocol):
|
|||||||
uri = f"{protocol}://{ip_address}{':' + str(PROTOCOL_PORT[protocol])}"
|
uri = f"{protocol}://{ip_address}{':' + str(PROTOCOL_PORT[protocol])}"
|
||||||
if protocol == 'RDP':
|
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 ''}"
|
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' and (username or password)):
|
elif protocol == 'SSH':
|
||||||
uri = f"{uri}/?{'&username=' + username if username else ''}{'&password=' + password if password else ''}"
|
params = []
|
||||||
|
if username:
|
||||||
|
params.append(f"username={username}")
|
||||||
|
if password:
|
||||||
|
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).lower()}'
|
||||||
return url
|
return url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user