[Webkit-unassigned] [Bug 53191] New: showModalDialog does not correctly return the defined returnValue in case domain relaxing is used

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 26 13:50:52 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=53191

           Summary: showModalDialog does not correctly return the defined
                    returnValue in case domain relaxing is used
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: brentm00 at gmail.com


Created an attachment (id=80230)
 --> (https://bugs.webkit.org/attachment.cgi?id=80230&action=review)
Sample web pages/scripts to reproduce

showModalDialog does not correctly return the defined returnValue in case domain relaxing is used, even if the opener window and the modal dialog content are properly set to the same domain. 

Ver: 534.17+

In some web applications content from different systems are embedded inside of iframes and need to communicate with each other, so it is common to have domain relaxing enabled, to allow JavaScript communication across the iframes.

We discovered that showModalDialog does not correctly return the defined returnValue in case domain relaxing is used, even if the opener window and the modal dialog content are properly set to the same domain.

Prerequisites to reproduce the issue:
1. Copy the modaldialog-folder containing the three files index.html, dialogbroken.html and dialogworkaround.html to a local webserver

2. Add the following line to your /etc/hosts 
127.0.0.1    localhost.test.domain

3.Disable the proxy server in the browser (if any)


Steps to reproduce:
1. Open WebKit and load the page from your server using http://localhost/modaldialog/
2. Click on "Open modal dialog"
3. Click on "Close and return TEST"
4. The alert-window shows the proper return value "TEST"
5. Now change the URL to http://localhost.test.domain/modaldialog/
6. Click on "Open modal dialog" again
7. Click on "Close and return TEST"

The alert-window now returns "undefined" instead of "TEST"

As a workaround it is possible to store the return value in the parent window, which can be accessed using window.opener, and to adapt the code which reads the return value accordingly.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list