Skip to content

fix(webapp): RDP web form ignores port in "host:port" (non-default RDP port fails) #1993

Description

Summary
The standalone web-app RDP form cannot connect to an RDP server on a non-default port. Unlike SSH/VNC/ARD, the RDP flow never calls extractHostnameAndPort, so the port is dropped and the default 3389 is appended.

Steps to reproduce

  1. Open an RDP session in the standalone web client (Gateway 2026.3.0).
  2. Hostname: 127.0.0.1:64389 (RDP reachable on 64389).
  3. Connect.

Actual

  • Gateway rejects: "Destination in RDCleanPath PDU does not match destination in token" and "connect to RDP server: tcp://127.0.0.1:64389:3389 failed: failed to lookup destination address".
  • Entering just 127.0.0.1 (default 3389) works.

Expected
host:port should be honored, like SSH/VNC/ARD.

Root cause
web-client-rdp.component.ts > fetchParameters:
host: hostname, // should be extractHostnameAndPort(hostname, DefaultRdpPort).hostname + pass port
Other protocols:
const extractedData = this.utils.string.extractHostnameAndPort(hostname, DefaultSshPort);
web-client.service.ts > generateProtocolToken:
destination: tcp://${fmt(host)}:${cp.port ?? getDefaultPort(protocol)}
RDP never sets cp.port -> always falls back to 3389.

Fix
In WebClientRdpComponent.fetchParameters, parse with extractHostnameAndPort(hostname, DefaultRdpPort) and set port, mirroring SSH/VNC/ARD. Optionally add an explicit port field.

Note

Human-tuned, LLM-assisted content.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions