Bug 475878 - krdc doesn't send correct username if it contains backslash
Summary: krdc doesn't send correct username if it contains backslash
Status: RESOLVED FIXED
Alias: None
Product: krdc
Classification: Applications
Component: RDP (other bugs)
Version First Reported In: 23.08.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Urs Wolfer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-20 14:56 UTC by Linus Kardell
Modified: 2024-12-22 20:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.02
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Linus Kardell 2023-10-20 14:56:36 UTC
SUMMARY
Krdc doesn't pass the full username to xfreerdp. If the username contains two backslashes, it only passes the part between them. This effectively makes it impossible to connect to a computer using a Microsoft account with krdc.

STEPS TO REPRODUCE
1. Enter a host to connect to and click "go to address"
2. Set up needed parameters for the connection (including at least adding "/sec:tls" as an additional option, and removing the "/media" that krdc always wants to mount even though it doesn't exist), and click OK.
3. Enter the username (for a computer using Microsoft account for authentication this is ".\AzureAD\<e-mail address>")
4. Enter password

OBSERVED RESULT
krdc launches an xfreerdp process with "/u:AzureAD" as a parameter, meaning is throws away part of the username.

EXPECTED RESULT
krdc launches an xfreerdp process with "/u:.\AzureAD\<e-mail address>"

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20231018
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.11
Kernel Version: 6.5.6-1-default (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 Gibyte of RAM
Graphics Processor: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
Manufacturer: ASUS
Comment 1 Jakub Stachowski 2024-10-02 17:46:33 UTC
RDP plugin used to detect LDAP logins ( DOMAIN\user) and split them before invoking xfreerdp.  In current version (24.11.70) this logic is gone and full username is always passed to libfreerdp login function. It should fix your usecase
Comment 2 Linus Kardell 2024-12-22 20:38:37 UTC
I tried to test it, but I just get a login failure. I no longer see an additional options field where I can enter /sec:tls, which I think is required.