Quirks when onion authentication prompt is shared between two tabs
Steps to reproduce
- Visit an onion site that requires authentication (without a saved key in the browser).
- Wait for authentication popup but do not interact with it.
- Open another tab and visit another onion site that requires authentication.
- Wait for authentication popup for the new tab.
- Enter the key and with focus still in the input press "Enter".
Result
The same key is submitted for both tabs.
Expect
The key should only be submitted for the current tab.
Cause
There is only one onionsite authentication prompt per window, as such two tabs will share the same DOM prompt. Currently we launch separate instances of OnionServicesAuthPrompt
for each tab, as if they are independent, even though they share the same elements.
In particular, the password input is shared by both tabs. E.g. switching between tabs does not clear the input.