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:
parent
6754afb6d6
commit
61fea36604
@ -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),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user