Invisible whitespaces are not stripped from "server" address field, preventing connections from working
Problem Description
When you copy-paste an (IP) address from somewhere else (ex: a spreadsheet, a website, etc.) there can often be whitespace characters at the beginning or the end.
However, Remmina does not strip them out from the "Server" (or username, etc.) fields in the remote connection profile properties dialog, and does not warn you about their presence, while they are effectively invisible to the naked eye.
The result is that any attempt to connect to those servers will inevitably fail in a rather subtle, difficult to troubleshoot way, simply saying Could not find the address for the RDP server " theipaddress".
; as a result, users like me can spend many days trying to troubleshoot everything else in the system, thinking that there is an OS firewall problem, a router firewall/forwarding problem, some ports blocking by the ISP, an incorrect password, or something else... when it turns out there was an invisible misconfiguration in Remmina.
Today, I was only able to find the cause by using Meld to compare the remmina connection profile files between two computers, and finding this \s
character in the diff, that is not noticeable in the UI (shown on the right):
What is the expected correct behavior?
Maybe the GUI could either show a visual warning (ex: maybe setting an error class on the corresponding GTK entry widget, and a secondary icon with tooltip with gtk_entry_set_icon_from_icon_name
and gtk_entry_set_icon_tooltip_markup
with an explanatory text), or a confirmation dialog on save (probably not as nice, as it is more intrusive), or automatically strip prefixed/trailing whitespaces when it is safe to do so.
For convenience, instead of manually looking for specific invalid characters like whitespaces, maybe you could use the g_uri_is_valid
function (or something like that) to check the general validity of anything being pasted/typed into the server field.
Remote System Description
- Server (OS name and version): Windows 10's RDP
- Special notes regarding the remote system (i.e. gateways, tunnel, etc.): no tunnel, nothing special
Local System Description
- Client (OS name and version): version provided by Fedora 39
- Remmina version (
remmina --version
): 1.4.33 - Installation(s):
-
Distribution package.
-
- Desktop environment (GNOME, Unity, KDE, ..): GNOME
- GTK backend (Wayland, Xorg): Wayland