fix: validate Quick Connect and ~/.ssh/config imports; unknown enum values no longer reset a profile's config
- Quick Connect runs the same validation as saved profiles, so an SSH connection without a username fails up front with a clear message (F5). - ~/.ssh/config imports fill a missing User (and jump-host user) with the local user name, as ssh does, and skip blocks that still don't validate, reporting how many (F6). - An unrecognised hostKeyPolicy/lineEnding/parity/flowControl/direction in a stored config falls back to that field's default instead of failing the whole JSON column and silently resetting every other setting; parse failures that remain are logged (F7).
This commit is contained in:
+7
-3
@@ -586,9 +586,13 @@ impl App {
|
||||
Request::Connect(id) => self.connect_profile(&id, false),
|
||||
Request::ConnectQuick(p) => {
|
||||
let name = if p.display_name.is_empty() { p.host.clone() } else { p.display_name.clone() };
|
||||
let sid = self.s.svc.connect_quick(p);
|
||||
self.add_session(&sid, true);
|
||||
self.s.info(format!("Connecting to {name}…"));
|
||||
match self.s.svc.connect_quick(p) {
|
||||
Ok(sid) => {
|
||||
self.add_session(&sid, true);
|
||||
self.s.info(format!("Connecting to {name}…"));
|
||||
}
|
||||
Err(e) => self.s.error(format!("Can't connect to {name}: {e}")),
|
||||
}
|
||||
}
|
||||
Request::ReloadProfiles => self.s.reload_profiles(),
|
||||
Request::ReloadPreferences => {
|
||||
|
||||
Reference in New Issue
Block a user