fix: forget saved credentials when a synced/imported profile is retargeted; --answer needs --screenshot
- Saved credentials are keyed by profile id. A sync peer (or a crafted import using 'overwrite') could keep an existing profile's id but point it at another host, user, GitHub API URL, RD Gateway or jump host, and the saved password/token went there on the next connect without a prompt. Such a change now forgets that profile's saved credentials (audited), so the user is asked again. - --answer / NEXUS_ANSWERS auto-fill every credential prompt and --answer is visible in the process list; they're now refused unless --screenshot is given (they exist for screenshot automation). - Docs: IRC passwords are only sent over TLS/tunnel/loopback; sync's retarget behaviour; the --answer restriction.
This commit is contained in:
@@ -99,8 +99,11 @@ fn main() -> eframe::Result {
|
||||
// SAFETY: still single-threaded here; no other thread can be reading the environment.
|
||||
unsafe { std::env::remove_var("NEXUS_ANSWERS") };
|
||||
}
|
||||
// They answer every credential prompt in order (and --answer is visible in the process list),
|
||||
// so they're only honoured for screenshot runs.
|
||||
if !opts.answers.is_empty() && opts.screenshot.is_none() {
|
||||
eprintln!("warning: --answer/NEXUS_ANSWERS auto-fill credential prompts; they are meant for screenshot automation only");
|
||||
eprintln!("--answer/NEXUS_ANSWERS only work together with --screenshot (they auto-fill credential prompts)");
|
||||
std::process::exit(2);
|
||||
}
|
||||
let config = match data_dir {
|
||||
Some(d) => {
|
||||
|
||||
Reference in New Issue
Block a user