Closed Bug 740576 Opened 13 years ago Closed 13 years ago

window.postMessage does not match on targetOrigin if page is loaded from file system as "file://"

Categories

(Firefox :: Untriaged, defect)

11 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 431935

People

(Reporter: brian, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 Build ID: 20120310010316 Steps to reproduce: Run the following script in a page that is loaded from the file system: window.postMessage('message with location', window.location); window.postMessage('message without location', '*'); window.addEventListener('message', function(event) { console.log('message received: ' + event.data); }); Actual results: Both messages should be received, but only the message without a targetOrigin is received. The restricted message is ignored completely. The script works fine and both messages are received if the file is loaded from a web server. For reference: https://developer.mozilla.org/en/DOM/window.postMessage
Thanks for taking time to report this! This looks the same as bug 431935 to me. Please re-open if you disagree.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: