Skip to content

Commit 126b083

Browse files
committed
added check-caller-allowed to set-signer-key-authorization
1 parent e63366c commit 126b083

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stackslib/src/chainstate/stacks/boot/pox-4.clar

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,9 @@
14371437
(max-amount uint)
14381438
(auth-id uint))
14391439
(begin
1440+
;; must be called directly by the tx-sender or by an allowed contract-caller
1441+
(asserts! (check-caller-allowed)
1442+
(err ERR_NOT_ALLOWED))
14401443
;; Validate that `tx-sender` has the same pubkey hash as `signer-key`
14411444
(asserts! (is-eq
14421445
(unwrap! (principal-construct? (if is-in-mainnet STACKS_ADDR_VERSION_MAINNET STACKS_ADDR_VERSION_TESTNET) (hash160 signer-key)) (err ERR_INVALID_SIGNER_KEY))

0 commit comments

Comments
 (0)