Opened 8 years ago
Closed 8 years ago
#37125 closed defect (bug) (fixed)
Shiny Updates: postMessage and browser extensions conflict
Reported by: | afercia | Owned by: | swissspidy |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description (last modified by )
Noticed in Chrome, using the "Accessibility Developer Tools" extension, see https://github.com/GoogleChrome/accessibility-developer-tools-extension
Looks like some browser extensions may use postMessage
and conflict with the updates postMessage
events:
In this case, the "Accessibility Developer Tools" extension triggers two "message" events when opening the plugin details modal and passes as data an object.
Maybe, in 'updates.js' it would be safer to check if the event data is a string before trying to parse it because this line:
message = $.parseJSON( originalEvent.data );
assumes originalEvent.data
is a well-formed JSON string while browser extensions or maybe also plugins might pass other types of data.
Attachments (1)
Change History (8)
This ticket was mentioned in Slack in #feature-shinyupdates by swissspidy. View the logs.
8 years ago
#3
@
8 years ago
- Component changed from Plugins to Upgrade/Install
- Milestone changed from Awaiting Review to 4.6
- Owner set to swissspidy
- Status changed from new to assigned
This ticket was mentioned in Slack in #feature-shinyupdates by swissspidy. View the logs.
8 years ago
#5
@
8 years ago
- Keywords needs-patch added
- Summary changed from Plugin updates postMessage and browser extensions conflict to Shiny Updates: postMessage and browser extensions conflict
We might be able to use
wp.updates.isValidResponse()
inside the postMessage handler.