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

WordPress Trac noreply at wordpress.org
Sun Jun 19 15:17:35 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        |  Resolution:
 Keywords:                |     Focuses:  javascript
--------------------------+------------------------------
Description changed by afercia:

Old description:

> 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.

New description:

 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/57EOl9W2a0.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#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list