mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Update/Install: Reject invalid messages in the Shiny Updates postMessage
handler.
This prevents conflicts with third-party messages (e.g. sent by browser extensions). The updates script expects a specific JSON-encoded message and now bails early if it's not valid JSON. Fixes #37125. Built from https://develop.svn.wordpress.org/trunk@37976 git-svn-id: http://core.svn.wordpress.org/trunk@37917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a728528542
commit
685cce51d2
@ -2144,7 +2144,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
message = $.parseJSON( originalEvent.data );
|
||||
} catch ( e ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'undefined' === typeof message.action ) {
|
||||
return;
|
||||
|
2
wp-admin/js/updates.min.js
vendored
2
wp-admin/js/updates.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-beta1-37975';
|
||||
$wp_version = '4.6-beta1-37976';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user