api2/config/remote: remove password from read_remote

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-05-22 14:51:43 +02:00 committed by Dietmar Maurer
parent 99f443c6ae
commit 5dcdcea293
1 changed files with 1 additions and 0 deletions

View File

@ -131,6 +131,7 @@ pub fn read_remote(
) -> Result<Value, Error> { ) -> Result<Value, Error> {
let (config, digest) = remote::config()?; let (config, digest) = remote::config()?;
let mut data = config.lookup_json("remote", &name)?; let mut data = config.lookup_json("remote", &name)?;
data.as_object_mut().unwrap().remove("password");
rpcenv["digest"] = proxmox::tools::digest_to_hex(&digest).into(); rpcenv["digest"] = proxmox::tools::digest_to_hex(&digest).into();
Ok(data) Ok(data)
} }