-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Prevent external domains from submitting more than one perm request at once #8148
Conversation
Builds ready [8484c1a]
Page Load Metrics (661 ± 60 ms)
|
Huh, interesting point 🤔. Maybe? It's conceivable that once we start adding more permissions, a dapp might allow the user to request them one-by-one in the dapp, thus triggering separate permission requests. |
Good point. We probably shouldn't restrict that without good reason. If we merge this, we should add an issue making sure that only e.g. duplicate |
I kinda like it just because it would fundamentally simplify the process of keeping the approval prompt safe. Devs will build interfaces that work well with our approval system, so we can simply avoid the scenario Mark suggested by merging this. |
@danfinlay I think the case Mark described warrants an issue and further discussion (we already talked about it some), but I do agree that this should be merged for now regardless! |
I think I've come around to this idea - it would definitely be simpler. And if we impose this restriction from the start, dapps will be forced to accommodate it. If we do allow multiple requests to be pending at once, then that raises the question of how to deal with "corrections", or requests that supersede previous ones. That would be a complex flow to handle; if we do nothing, then the user might customize permissions to their liking on the first request, then not remember what the chose the second time they're asked (i.e. we'd want to go the extra mile to show what's changing in order to help the user understand what's going on). If we try to merge the requests, then we risk things updating while the user is reviewing, which is dangerous. We could issue an alert, but that would be clunky. And on top of all of that, we'd still want to have some sort of rate-limiting in place to prevent abuse. Far simpler to disallow it altogether. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
Details
I haven't fully decided whether we should do this. Are there legitimate uses for multiple permission requests submitted at once?
Related: #7969 (whichever is merged last will have to be rebased and updated with new tests)