Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #229: Safe can be added as owner of itself #259

Merged
merged 2 commits into from
Feb 23, 2021

Conversation

rmeissner
Copy link
Member

@rmeissner rmeissner commented Feb 22, 2021

Closes #229

Add checks to disallow Safe as owner of itself with default methods

#229 proposes to prevent adding the Safe as an owner of itself and to check on execution if the signer is the Safe itself.

For this PR checks have been added to:

  • setup
  • addOwnerWithThreshold
  • swapOwner

No check has been added to the execution process, as this would prevent user from potentially recovering a Safe that has itself as an owner. To get into this state after this update you would need to use a delegate call that messes with the Safes state. This is out of scope of our checks (as we expect users to pay special attention to delegate calls)

@coveralls
Copy link

coveralls commented Feb 22, 2021

Coverage Status

coverage: 97.855%. remained the same
when pulling 58ef109 on feature/issue_229_safe_as_owner
into d6be92f on development.

Copy link
Member

@Uxio0 Uxio0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright, there're no other places where an owner can be added

@rmeissner rmeissner merged commit 36db12a into development Feb 23, 2021
@rmeissner rmeissner deleted the feature/issue_229_safe_as_owner branch February 23, 2021 23:10
Saw-mon-and-Natalie pushed a commit to Saw-mon-and-Natalie/safe-contracts that referenced this pull request Nov 1, 2023
fdarian pushed a commit to fdarian/safe-contracts that referenced this pull request Jan 14, 2024
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.

Adding the Safe itself as an owner has the same effect as reducing the threshold by 1
4 participants