fix: save typed credentials only after the connection succeeds, and re-ask when a saved one is rejected
A password typed at a 'saved' prompt was stored before the server accepted it, so a typo was persisted and silently retried on every reconnect. Typed values are now held per attempt and written once the session connects; when the server refuses a saved credential the next attempt asks again and the new value replaces it on success. A store failure (keychain refused, vault locked) now shows a toast instead of being swallowed, and reconnect prompts wait 5 minutes like the first connect (SEC-20261012-015, F1, F2, F20).
This commit is contained in:
@@ -269,10 +269,6 @@ impl Secrets {
|
||||
}
|
||||
|
||||
/// Stores where possible: the keychain, else the vault if it's unlocked.
|
||||
pub fn set(&self, key: &str, value: &str) {
|
||||
let _ = self.set_checked(key, value);
|
||||
}
|
||||
|
||||
pub fn set_checked(&self, key: &str, value: &str) -> Result<()> {
|
||||
if self.keychain_ok && self.keychain.set(key, value).is_ok() {
|
||||
return Ok(());
|
||||
|
||||
Reference in New Issue
Block a user