Review 13.4 Merged

88245[BUGFIX] Guard modal access to prevent same-origin policy errors

Oli Bartsch CR +2 V +2 Easy +12 −6 updated 02/17/25, 10:53

Commit message

element-browser.ts has an eager iframe looping mechanism that
tries to detect modal inception levels. This can fail in cases
where browser extensions, such as LastPass, inject iframes.

Access to these iframes is blocked by the same-origin policy,
leading to DOMException errors like:
"Permission denied to access property on cross-origin object"

This patch guards these cases using try/catch statements to
gracefully handle the exceptions and ignore modal detection
in these inaccessible iframes.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
  • Verified V +2 Done
    • Oli Bartsch +2
    • core-ci +1 CI

Issues 3

Files 2

Review log 34

  1. Oli Bartsch commented on patch set 1 02/17/25, 09:57

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 02/17/25, 10:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74241

  3. Oli Bartsch voted on patch set 1 CR +2 V +2 02/17/25, 10:53

  4. Oli Bartsch merged patch set 2 02/17/25, 10:53