[control] API fixes: atomic Idempotency-Key reservation, no echo of odd field names or path parameters, askpass answers only password prompts, file protocol not forced, token test split on the known prefix, serialisation test without second-resolution times

This commit is contained in:
2026-11-07 18:57:54 +01:00
parent 54574702ea
commit f382fe2f76
7 changed files with 158 additions and 51 deletions
+6
View File
@@ -40,6 +40,12 @@ fn askpass() -> ExitCode {
);
return ExitCode::SUCCESS;
}
// Answer only the password prompt; anything else (a passphrase, a host key question)
// gets no answer, so the push fails instead of handing out the token.
if !prompt.starts_with("Password for") {
eprintln!("ianitor-control askpass: not answering {prompt:?}");
return ExitCode::FAILURE;
}
let Some(file) = std::env::var_os("IANITOR_ASKPASS_FILE") else {
return ExitCode::FAILURE;
};