netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
11.35k stars 520 forks source link

netbird gui improvement for URL sanitization / user feedback #1631

Open TSJasonH opened 9 months ago

TSJasonH commented 9 months ago

Describe the problem

Management URLs are not sanitized against user input. If the user enters invalid characters nothing happens when they click connect and they are left scratching their heads. Users copy/paste the Management URL. Sometimes they get extra characters in the clipboard.

To Reproduce

Steps to reproduce the behavior:

In this example, a carriage return was included by the user over-selecting during copy/paste. To reproduce simply over-copy a URL to the next line so a '/r' gets invisibly added to the clipboard entry and paste it into the gui management URL field.

Expected behavior

The gui should sanitize user inputs against this type of obvious error or provide an error pop-up for the user without having to dig into the client.log

Are you using NetBird Cloud?

Self-hosted

NetBird version

0.26

Context

From the client.log (domain masked): 2024-02-27T15:27:46+04:00 ERRO client/internal/config.go:337: failed parsing Management URL URL https://netbird.domain.com:33073 : [parse "https://netbird.domain.com:33073\r ": net/url: invalid control character in URL]

pascal-fischer commented 9 months ago

Hi @TSJasonH,

thanks for pointing this out. We will work on improving the validation of the fields in the desktop client UI.