[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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user