[wp-trac] [WordPress Trac] #37125: Plugin updates postMessage and browser extensions conflict

WordPress Trac noreply at wordpress.org
Sun Jun 19 14:27:32 UTC 2016


#37125: Plugin updates postMessage and browser extensions conflict
--------------------------+-----------------------------
 Reporter:  afercia       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:  3.9
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 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:

 [[Image(https://cldup.com/PuumMjgl3l.png)]]

 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37125>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list