macOS on-demand Wi-Fi space at the beginning of SSID doesn't work as expected

Gabriel Augendre gabriel at augendre.info
Thu Mar 16 16:58:45 UTC 2023


Hello,

I hope this is the right place to submit what, in my opinion, is a bug.

I'm using Wireguard on macOS, installed from the App Store[1].
App version: 1.0.16 (27)
Go backend version: 1e2c3e5a

[1]: https://apps.apple.com/fr/app/wireguard/id1451685025?mt=12

I'm unable to add an SSID starting with a space in the on-demand except/only configuration. The app strips the whitespace at the beginning of the SSID.

Steps to reproduce:
1. Install WireGuard
2. Setup a tunnel
3. Enable On-Demand Wi-Fi
4. Select "Only these SSIDs" or "Except these SSIDs"
5. Type an SSID name starting with a space
6. Type Enter or Tab to validate the selection

Notice how the space at the beginning of the SSID has disappeared in the text box. Also, the configuration treats the SSID with no space at the beginning. If you opted for "only" this SSID and you're connected to it, then WireGuard won't connect. If you selected "except", then WireGuard will connect anyway.

The iOS app doesn't seem affected by this bug. Selecting a known SSID starting with a space works as expected.

I'd be glad to contribute a patch but I have no experience in Swift programming.
I'm guessing the issue lies somewhere in Sources/WireGuardApp/UI/ActivateOnDemandViewModel.swift though.

Regards,

-- 
Gabriel Augendre



More information about the WireGuard mailing list