theinvisible / openfortigui

VPN-GUI to connect to Fortigate-Hardware, based on openfortivpn
https://hadler.me/linux/openfortigui/
GNU General Public License v3.0
489 stars 54 forks source link

Trim hostname, username, etc when saving VPN details #136

Closed rm-hull closed 3 years ago

rm-hull commented 3 years ago

I had a situation where I had saved a VPN configuration with a single space after the hostname, and it refused to connect with the following logging:

INFO:   Start tunnel.
INFO:   Closed connection to gateway.
ERROR:  connect: Connection refused
INFO:   Could not log out.

I knew the configuration worked as it was copied from my openfortivpn config.

It might be worth trimming whitespace characters from fields like the host before using them or saving them.

theinvisible commented 3 years ago

Thanks, its fixed in current master branch and next release