[wp-trac] [WordPress Trac] #34933: postMessage - targetOrigin does not contains port number
WordPress Trac
noreply at wordpress.org
Wed Dec 9 14:02:01 UTC 2015
#34933: postMessage - targetOrigin does not contains port number
-----------------------------+-----------------------------
Reporter: ctomczyk | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 4.4
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
'''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''
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34933>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list