-
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersnmrsChanges to nmrsChanges to nmrs
Description
nmrs/nmrs/src/core/connection.rs
Lines 635 to 652 in a031a22
| fn decide_saved_connection( | |
| saved: Option<OwnedObjectPath>, | |
| creds: &WifiSecurity, | |
| ) -> Result<SavedDecision> { | |
| match saved { | |
| Some(_) if matches!(creds, WifiSecurity::WpaPsk { psk } if !psk.trim().is_empty()) => { | |
| Ok(SavedDecision::RebuildFresh) | |
| } | |
| Some(path) => Ok(SavedDecision::UseSaved(path)), | |
| None if matches!(creds, WifiSecurity::WpaPsk { psk } if psk.trim().is_empty()) => { | |
| Err(ConnectionError::NoSavedConnection) | |
| } | |
| None => Ok(SavedDecision::RebuildFresh), | |
| } | |
| } |
The logic for empty PSK passwords is unclear and could lead to user confusion. When a user provides an empty PSK and there's no saved connection, we return NoSavedConnection error, but the real issue is that they didn't provide a password.
We should probably add a new error variant ConnectionError::MissingPassword or ConnectionError::InvalidCredentials for clarity.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersnmrsChanges to nmrsChanges to nmrs