Bug 179637 - window.frames javascript addressing has problems
Summary: window.frames javascript addressing has problems
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: 4.1.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: testcase
Depends on:
Blocks:
 
Reported: 2009-01-04 18:50 UTC by Thomas Bartschies
Modified: 2013-11-02 11:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase file (394 bytes, text/html)
2009-06-20 14:54 UTC, Simon Yuan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bartschies 2009-01-04 18:50:25 UTC
Version:            (using KDE 4.1.3)
Compiler:          gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)
 
OS:                Linux
Installed from:    Fedora RPMs

Hello,
the following code is used in a variant by the
imdb.com flash trailer player, that doesn't work
because of it and may be other causes. But this is
the first. Works in Webkit and Firefox though.

Should be pretty much self explaining. The location
of the iframe should change, but wouldn't in konq.

<html><body>
<script type="text/javascript">
 document.writeln('<iframe src="http://www.heise.de" id="testiframe" name="testiframe" scrolling="no" width="100%" height="100%" margin="none" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" frameborder="0"></iframe>');
  window.parent.frames['testiframe'].location.replace('http://www.heise.de/newsticker/classic');
</script>
</body></html>

Regards, Thomas
Comment 1 Jaime Torres 2009-06-12 16:52:25 UTC
Your testcase does not works for me in KDE 4.2.91. I'm redirected to www.heise.de.

But it works with this modified testcase.

<html><body>
<script type="text/javascript">
 document.writeln('<iframe src="http://www.heise.de" id="testiframe" name="testiframe" scrolling="no" width="100%" height="100%" margin="none" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" frameborder="0"></iframe>');
 
  alert(window.parent.frames['testiframe'].location);
  window.parent.frames['testiframe'].location.replace('http://www.heise.de/newsticker/classic');
</script>
</body></html>

Should location be initialized when the iframe is created?
Comment 2 Thomas Bartschies 2009-06-12 17:32:01 UTC
Please test directly with the imdb.com movieplayer. Shouldn't be too hard.
They use this technique for securing their content.
Comment 3 Simon Yuan 2009-06-20 14:54:46 UTC
Created attachment 34676 [details]
Testcase file
Comment 4 Simon Yuan 2009-06-20 14:55:34 UTC
I can confirm this bug.

Qt: qt-copy 979410
KDE: 4.2.92 (KDE 4.2.92 (KDE 4.3 >= 20090617))
kdelibs svn rev. 983828 / kdebase svn rev. 983852
on ArchLinux i686 - Kernel 2.6.29.4
Comment 5 Andrea Iacovitti 2013-11-02 11:46:14 UTC
This bug seems fixed now (KDE 4.11.2).