Files
Mike Degatano 2e32d0d285 Fix Wi-Fi auth visibility, PSK validation, and a connection lookup race
Report unsupported Wi-Fi auth methods (WPA3/sae, wpa-eap, owe, ...) instead
of hiding the interface's state/config entirely. _map_nm_wifi() used to
return None for these, blanking out both state.wifi and config.wifi even
while genuinely connected. Adds AuthMethod.UNSUPPORTED, reported on GET
but rejected on write; get_connection_from_interface() now leaves the
existing 802-11-wireless-security section untouched for it instead of
clearing it as if it were open auth; update_config() allows omitting
wifi entirely for such an interface, since its config can't be safely
echoed back or overwritten.

Require psk when creating or switching to a new wpa-psk profile, since
GET never returns the actual secret (only psk_set). A psk-less wpa-psk
request used to pass schema validation, get persisted, and only fail
asynchronously at activation with NO_SECRETS. Omitting psk remains
valid when an existing wpa-psk profile is kept unchanged. Raised as a
new translatable HostNetworkWifiPskRequiredError.

Broaden the exception handling in find_connection_settings() to also
catch DBusInterfaceError/DBusObjectError, not just DBusError. A profile
can vanish between list_connections() and connect() (e.g. another
client deleting it), surfacing as UnknownObject/UnknownMethod, neither
of which derives from DBusError.

Adds regression tests for all three, each confirmed to fail without
its corresponding fix.

Addresses review feedback on #7192.
2026-09-12 02:28:48 +00:00
..