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

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

* Recommend checked vote reauthorization

(cherry picked from commit 0b8fcf0808)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
This commit is contained in:
mergify[bot]
2021-10-28 23:10:25 +00:00
committed by GitHub
parent da08f3dc2b
commit a595e06b48
2 changed files with 14 additions and 6 deletions

View File

@@ -683,7 +683,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())?