Skip to content

Commit a03c986

Browse files
Muhammad Faraz  Maqsoodigobranco
authored andcommitted
fix: security issue
- It's related previous PR: https://github.com/openedx/edx-platform/pull/36643/files. - This time followed LMS template(https://github.com/openedx/edx-platform/blob/5b3caa93e218e38e7459bdc1ff99ee175e93a22b/lms/templates/courseware/courseware-chromeless.html#L126C7-L127C42) as we are not getting any error on LMS. Attaching error for context: `Uncaught SecurityError: Failed to read a named property 'offsetHeight' from 'Window': Blocked a frame with origin "https://studio.stage.edx.org/" from accessing a cross-origin frame.`
1 parent 480a445 commit a03c986

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cms/templates/container_chromeless.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@
215215
// it will report the height of its contents to the parent window when the
216216
// document loads, window resizes, or DOM mutates.
217217
if (window !== window.parent) {
218-
var lastHeight = window.parent[0].offsetHeight;
219-
var lastWidth = window.parent[0].offsetWidth;
218+
var lastHeight = window.offsetHeight;
219+
var lastWidth = window.offsetWidth;
220220
var contentElement = document.getElementById('content');
221221

222222
function dispatchResizeMessage(event) {

0 commit comments

Comments
 (0)