connect fix 4

This commit is contained in:
2026-08-21 06:14:10 +02:00
parent bf2a02679d
commit 5e506c9921
17 changed files with 1266 additions and 162 deletions

View File

@ -174,8 +174,12 @@ async def rdp_tunnel(
)
return
# username/domain stehen seit Migration 0010 bei den Zugangsdaten und nicht
# mehr am Host -- der Benutzername gehoert zur Anmeldung, nicht zur
# Beschreibung des Zielsystems.
cred_cursor = await conn.execute(
"SELECT password_enc FROM rdp_credentials WHERE host_id = ?", (host_id,)
"SELECT password_enc, username, domain FROM rdp_credentials WHERE host_id = ?",
(host_id,),
)
cred_row = await cred_cursor.fetchone()
if cred_row is None:
@ -221,7 +225,9 @@ async def rdp_tunnel(
# riss ein Fehler hier VOR jeglicher Protokollierung durch und die
# Sitzung verschwand spurlos (schwarzer Bildschirm, kein Log-Eintrag).
password = decrypt_secret(cred_row[0], associated_data=b"rdp_password")
params = build_rdp_params(host, password.decode())
params = build_rdp_params(
host, password.decode(), username=cred_row[1], domain=cred_row[2]
)
tunnel = await open_tunnel(
guacd_host=settings.guacd_host, guacd_port=settings.guacd_port,
protocol="rdp", params=params, screen_width=width, screen_height=height, dpi=dpi,