summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-11-04 20:30:30 +0000
committerMoonchild <moonchild@palemoon.org>2021-11-13 23:56:26 +0000
commit0a21a75bfe8fec262c02308f59eb40363e83ae94 (patch)
treec35717825fb69106fc8454461621136c42c33bdb
parent125b40ae29b6b64d83efc39c01de35134b2509ad (diff)
downloadbasilisk-0a21a75bfe8fec262c02308f59eb40363e83ae94.tar.gz
Prevent form popups from crossing the "line of death".
Without this, doorhangers could potentially be spoofed to overlap legitimate permission popups like geolocation or plugin permissions. Another reason doorhangers are evil!
-rw-r--r--basilisk/modules/FormValidationHandler.jsm2
1 files changed, 1 insertions, 1 deletions
diff --git a/basilisk/modules/FormValidationHandler.jsm b/basilisk/modules/FormValidationHandler.jsm
index e7e7b14..b88c282 100644
--- a/basilisk/modules/FormValidationHandler.jsm
+++ b/basilisk/modules/FormValidationHandler.jsm
@@ -124,7 +124,7 @@ var FormValidationHandler =
let tabBrowser = aWindow.gBrowser;
this._anchor = tabBrowser.popupAnchor;
this._anchor.left = aPanelData.contentRect.left;
- this._anchor.top = aPanelData.contentRect.top;
+ this._anchor.top = Math.max(0, aPanelData.contentRect.top);
this._anchor.width = aPanelData.contentRect.width;
this._anchor.height = aPanelData.contentRect.height;
this._anchor.hidden = false;