-
Notifications
You must be signed in to change notification settings - Fork 973
prevent js alert spoofing attacks #2755
Comments
Can we do it like Chrome does it? When an alert or confirm is invoked in another tab, different from the current active one, the tab that triggered the alert becomes the active tab (without any user interaction needed)? I think this is the most clean way to do it, because some users still may get confused. |
I much prefer what @diracdeltas mentioned with a button to switch to the tab. I find it very obnoxious and annoying that Chrome makes itself the active window and loses my current-tab-context. |
@bridiver how involved do you think this will be WRT electron? wondering if it will be feasible for 0.12.8 |
I recall Chrome puts a checkbox in the JS dialogs so users can stop them repeating from a given origin. Is that right? We could do worse! |
I think the current plan is to generate the JS dialogs inside the brave ui instead of using the current OS dialogs and display them per-tab instead of window modal. Similar to Safari, but also adding the checkbox as @BrendanEich mentioned |
fyi - Safari won't even display the window.alert if you run it inside a |
Related issue: #3794 |
Moving to 0.13.4 |
Verified on master. Works fine |
Test Plan
output
area, click theClick me to test an alert
buttonoutput
area, click theClick me to test a confirm
buttonoriginal issue text
if you open https://jsfiddle.net/s4oab7yn/ and then switch to another tab, the alert shows looks like it's coming from the currently-active tab instead of the tab it's actually from.
two mitigations:
The text was updated successfully, but these errors were encountered: