Opened 9 years ago
Last modified 5 years ago
#34933 new defect (bug)
postMessage - targetOrigin does not contains port number
Reported by: | ctomczyk | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Upgrade/Install | Keywords: | |
Focuses: | Cc: |
Description
Current behavior
When the skins are upgraded then the communication to the parent node using postMessage is blocked when the user is on the URL that has specified port. Example: example.com:81.
I see in console:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://localhost') does not match the recipient window's origin ('http://localhost:81').
Expected behavior
File wp-admin\includes\class-wp-upgrader-skins.php line 168 contains:
window.parent.postMessage( JSON.stringify( { action: "decrementUpdateCount", upgradeType: "' . $type . '" } ), window.location.protocol + "//" + window.location.hostname );
The targetOrigin for the postMessage should also contains port number. E.g. window.location.hostname + window.location.port
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
The message in console