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

Updating revoke to include default behavior for Address #168

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

blockiosaurus
Copy link
Contributor

No description provided.

@blockiosaurus blockiosaurus requested a review from danenbm July 12, 2024 18:08
Copy link

vercel bot commented Jul 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mpl-core-js-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2024 6:08pm

Comment on lines +354 to +357
let base_result = if ctx.self_authority
== &(Authority::Address {
address: *ctx.authority_info.key,
})
Copy link
Contributor

@danenbm danenbm Jul 13, 2024

Choose a reason for hiding this comment

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

I think there may be an issue with this, which isn't related to your PR but a problem with this logic in general.

If you set the authority to the Update Authority on an owner-managed plugin, and then you sign revokePluginAuthority as the Update Authority, it won't be approved by the asset, and since it is not a plain address, it will not be approved here by the plugin, so the Update Authority would never be able to self-revoke.

I think its a similar problem for an authority-managed plugin with authority set to Owner. In that case, Owner would never be able to self-revoke.

I had a backlog item to fix this on my list, but it becomes easier with your PR I think because you moved the default behavior to one spot. Maybe all we need to do is add a check here for the other Authority types?

I approved the PR without this change if you don't want to increase scope of it at the moment.

@blockiosaurus blockiosaurus merged commit 8ff399b into main Jul 13, 2024
12 checks passed
@blockiosaurus blockiosaurus deleted the feat/revoke-default-behavior branch July 13, 2024 22:12
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.

2 participants