Check whether vote-authorize-voter-checked new vote authority is_interactive (#21051)

* Check interactive signer for vote-authorize-voter-checked

* Recommend checked vote reauthorization
This commit is contained in:
Tyera Eulberg
2021-10-28 14:48:16 -06:00
committed by GitHub
parent 976298b292
commit 0b8fcf0808
2 changed files with 14 additions and 6 deletions

View File

@ -743,7 +743,15 @@ pub fn process_vote_authorize(
)
})?
.1;
check_current_authority(current_authorized_voter, &authorized.pubkey())?
check_current_authority(current_authorized_voter, &authorized.pubkey())?;
if let Some(signer) = new_authorized_signer {
if signer.is_interactive() {
return Err(CliError::BadParameter(format!(
"invalid new authorized vote signer {:?}. Interactive vote signers not supported",
new_authorized_pubkey
)).into());
}
}
}
VoteAuthorize::Withdrawer => {
check_current_authority(&vote_state.authorized_withdrawer, &authorized.pubkey())?