Skip to content

security: reject self-targeted proposals in propose_admin_transfer - #50

Merged
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
Jagadeeshftw:security/contracts-admin-proposal-validation
Jun 24, 2026
Merged

security: reject self-targeted proposals in propose_admin_transfer#50
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
Jagadeeshftw:security/contracts-admin-proposal-validation

Conversation

@Jagadeeshftw

Copy link
Copy Markdown
Contributor

Summary

Hardens propose_admin_transfer to reject proposing the current admin as the new admin. After admin.require_auth(), the call now panics with the new append-only error InvalidAdminProposal = 13 when new_admin == admin, surfacing no-op handovers as caller mistakes.

Closes #43

Test output

test result: ok. 26 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Security notes

Prevents a no-op admin proposal from masking a misconfigured handover; the validation runs only after admin auth, so it cannot be triggered by unauthorised callers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Jagadeeshftw
Jagadeeshftw force-pushed the security/contracts-admin-proposal-validation branch from 29ea093 to 0be5d3d Compare June 24, 2026 02:25
@mikewheeleer

Copy link
Copy Markdown
Contributor

good hardening on propose_admin_transfer. merging 🚀

@mikewheeleer
mikewheeleer merged commit 6321c31 into Agentpay-Org:main Jun 24, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject same-address and self-targeted admin proposals in propose_admin_transfer

2 participants