Merge pull request #2648 from keepassxreboot/fix/dont_allow_sandboxed_iframes

Do not allow sandboxed iframes
This commit is contained in:
Sami Vänttinen 2025-08-23 13:40:07 +03:00 committed by GitHub
commit 991bdb8c95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1028,6 +1028,13 @@ kpxc.reconnect = async function() {
const isIframeAllowed = async function() {
sendMessage('iframe_detected', false);
// Don't allow sandboxed iframes
if (self.origin === null || self.origin === 'null') {
logDebug('Error: Sandboxed iframes are not allowed');
return false;
}
try {
// Check for Cross-domain security error when inspecting window.top.location.href
const currentLocation = window.top.location.href;