mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-22 19:13:37 +08:00
check that the name is valid in register/renewal (we already do this implicitly through the check() method, but we should do it explicitly for clarity)
This commit is contained in:
@@ -318,6 +318,11 @@ def check_register( state_engine, nameop, block_id, checked_ops ):
|
||||
log.warning("No recipient script given")
|
||||
return False
|
||||
|
||||
# name must be well-formed
|
||||
if not is_name_valid( name ):
|
||||
log.warning("Malformed name '%s'" % name)
|
||||
return False
|
||||
|
||||
epoch_features = get_epoch_features(block_id)
|
||||
|
||||
name_fee = None
|
||||
@@ -560,6 +565,11 @@ def check_renewal( state_engine, nameop, block_id, checked_ops ):
|
||||
log.warning("No recipient given")
|
||||
return False
|
||||
|
||||
# name must be well-formed
|
||||
if not is_name_valid( name ):
|
||||
log.warning("Malformed name '%s'" % name)
|
||||
return False
|
||||
|
||||
# pre F-day 2017, on renewal, the sender and recipient must be the same
|
||||
# post F-day 2017, the recipient and sender can differ
|
||||
if sender != recipient:
|
||||
|
||||
Reference in New Issue
Block a user