Skip to content

Commit

Permalink
Validate account address is 32byte long and contains alphanumeric cha…
Browse files Browse the repository at this point in the history
…racters only.
  • Loading branch information
hsoerensen committed Jan 20, 2024
1 parent 658964c commit e7b31c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ busy_wait_until_balance_is_1_voi() {

get_account_addr() {
account_addr=$(execute_sudo 'cat /var/lib/voi/algod/data/voi_address')
if [[ ! $account_addr =~ ^[A-Za-z0-9]{32}$ ]]; then
abort "Invalid account address: ${account_addr}"
fi
}

generate_participation_key() {
Expand Down

0 comments on commit e7b31c0

Please sign in to comment.