1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-09 19:28:06 +01:00

[PM-5189] Implementing a set threshold for the maximum depth for which we are willing to calculate sub frame offsets

This commit is contained in:
Cesar Gonzalez 2024-06-12 17:40:41 -05:00
parent 6754afb6d6
commit 61fea36604
No known key found for this signature in database
GPG Key ID: 3381A5457F8CCECF
3 changed files with 3 additions and 3 deletions

View File

@ -1073,7 +1073,7 @@ export class OverlayBackground implements OverlayBackgroundInterface {
const parentFrameIds = new Set(); const parentFrameIds = new Set();
subFrameOffsetsForTab.forEach((subFrameOffsetData) => subFrameOffsetsForTab.forEach((subFrameOffsetData) =>
subFrameOffsetData.parentFrameIds.forEach((parentFrameId) => subFrameOffsetData?.parentFrameIds.forEach((parentFrameId) =>
parentFrameIds.add(parentFrameId), parentFrameIds.add(parentFrameId),
), ),
); );

View File

@ -16,4 +16,4 @@ export const RedirectFocusDirection = {
Next: "next", Next: "next",
} as const; } as const;
export const MAX_SUB_FRAME_DEPTH = 10; export const MAX_SUB_FRAME_DEPTH = 8;

View File

@ -1060,7 +1060,7 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
const subFrameData: SubFrameDataFromWindowMessage = event.data.subFrameData; const subFrameData: SubFrameDataFromWindowMessage = event.data.subFrameData;
subFrameData.subFrameDepth++; subFrameData.subFrameDepth++;
if (subFrameData.subFrameDepth > MAX_SUB_FRAME_DEPTH) { if (subFrameData.subFrameDepth >= MAX_SUB_FRAME_DEPTH) {
void this.sendExtensionMessage("destroyAutofillInlineMenuListeners", { subFrameData }); void this.sendExtensionMessage("destroyAutofillInlineMenuListeners", { subFrameData });
return; return;
} }