Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/kubio/build/block-library/blocks-manifest.php
+++ b/kubio/build/block-library/blocks-manifest.php
@@ -3,12 +3,6 @@
/** Kubio - automatically generated file **/
return array(
- 'button' => array(
- 'classes' => array(
- 'ButtonBlock'
- ),
- 'rel' => 'button/index.php'
- ),
'accordion' => array(
'classes' => array(
'AccordionBlock'
@@ -21,6 +15,12 @@
),
'rel' => 'button-group/index.php'
),
+ 'button' => array(
+ 'classes' => array(
+ 'ButtonBlock'
+ ),
+ 'rel' => 'button/index.php'
+ ),
'column' => array(
'classes' => array(
'ColumnBlock'
@@ -57,11 +57,11 @@
),
'rel' => 'header/index.php'
),
- 'icon' => array(
+ 'heading' => array(
'classes' => array(
- 'IconBlock'
+ 'HeadingBlock'
),
- 'rel' => 'icon/index.php'
+ 'rel' => 'heading/index.php'
),
'home-button' => array(
'classes' => array(
@@ -69,11 +69,11 @@
),
'rel' => 'home-button/index.php'
),
- 'heading' => array(
+ 'icon' => array(
'classes' => array(
- 'HeadingBlock'
+ 'IconBlock'
),
- 'rel' => 'heading/index.php'
+ 'rel' => 'icon/index.php'
),
'hero' => array(
'classes' => array(
@@ -81,12 +81,6 @@
),
'rel' => 'hero/index.php'
),
- 'image' => array(
- 'classes' => array(
- 'ImageBlock'
- ),
- 'rel' => 'image/index.php'
- ),
'image-gallery' => array(
'classes' => array(
'ImageGalleryBlock',
@@ -100,23 +94,23 @@
),
'rel' => 'language-selector/index.php'
),
- 'link-group' => array(
- 'classes' => array(
- 'LinkGroupBlock'
- ),
- 'rel' => 'link-group/index.php'
- ),
'link' => array(
'classes' => array(
'LinkBlock'
),
'rel' => 'link/index.php'
),
- 'logo' => array(
+ 'image' => array(
'classes' => array(
- 'LogoBlock'
+ 'ImageBlock'
),
- 'rel' => 'logo/index.php'
+ 'rel' => 'image/index.php'
+ ),
+ 'link-group' => array(
+ 'classes' => array(
+ 'LinkGroupBlock'
+ ),
+ 'rel' => 'link-group/index.php'
),
'map' => array(
'classes' => array(
@@ -133,6 +127,12 @@
),
'rel' => 'navigation/index.php'
),
+ 'logo' => array(
+ 'classes' => array(
+ 'LogoBlock'
+ ),
+ 'rel' => 'logo/index.php'
+ ),
'pagination-nav-button' => array(
'classes' => array(
'PaginationNavButtonBlock'
@@ -145,12 +145,6 @@
),
'rel' => 'page-title/index.php'
),
- 'pagination-numbers' => array(
- 'classes' => array(
- 'PaginationNumbersBlock'
- ),
- 'rel' => 'pagination-numbers/index.php'
- ),
'post-author-avatar' => array(
'classes' => array(
'PostAuthorAvatarBlock'
@@ -163,23 +157,29 @@
),
'rel' => 'post-author-bio/index.php'
),
+ 'pagination-numbers' => array(
+ 'classes' => array(
+ 'PaginationNumbersBlock'
+ ),
+ 'rel' => 'pagination-numbers/index.php'
+ ),
'post-author-name' => array(
'classes' => array(
'PostAuthorNameBlock'
),
'rel' => 'post-author-name/index.php'
),
- 'post-comments' => array(
+ 'post-categories' => array(
'classes' => array(
- 'PostCommentsBlock'
+ 'PostCategoriesBlock'
),
- 'rel' => 'post-comments/index.php'
+ 'rel' => 'post-categories/index.php'
),
- 'post-excerpt' => array(
+ 'post-comments' => array(
'classes' => array(
- 'PostExcerptBlock'
+ 'PostCommentsBlock'
),
- 'rel' => 'post-excerpt/index.php'
+ 'rel' => 'post-comments/index.php'
),
'post-comments-form' => array(
'classes' => array(
@@ -187,6 +187,12 @@
),
'rel' => 'post-comments-form/index.php'
),
+ 'post-excerpt' => array(
+ 'classes' => array(
+ 'PostExcerptBlock'
+ ),
+ 'rel' => 'post-excerpt/index.php'
+ ),
'post-featured-image' => array(
'classes' => array(
'PostFeaturedImageBlock'
@@ -211,23 +217,17 @@
),
'rel' => 'post-title/index.php'
),
- 'query-layout' => array(
- 'classes' => array(
- 'QueryLayout'
- ),
- 'rel' => 'query-layout/index.php'
- ),
'query-pagination' => array(
'classes' => array(
'QueryPaginationBlock'
),
'rel' => 'query-pagination/index.php'
),
- 'post-categories' => array(
+ 'query-layout' => array(
'classes' => array(
- 'PostCategoriesBlock'
+ 'QueryLayout'
),
- 'rel' => 'post-categories/index.php'
+ 'rel' => 'query-layout/index.php'
),
'read-more-button' => array(
'classes' => array(
@@ -235,12 +235,6 @@
),
'rel' => 'read-more-button/index.php'
),
- 'row' => array(
- 'classes' => array(
- 'RowBlock'
- ),
- 'rel' => 'row/index.php'
- ),
'search-form' => array(
'classes' => array(
'SearchForm'
@@ -253,6 +247,12 @@
),
'rel' => 'section/index.php'
),
+ 'row' => array(
+ 'classes' => array(
+ 'RowBlock'
+ ),
+ 'rel' => 'row/index.php'
+ ),
'shortcode' => array(
'classes' => array(
'ShortcodeBlock'
@@ -265,6 +265,12 @@
),
'rel' => 'sidebar/index.php'
),
+ 'spacer' => array(
+ 'classes' => array(
+ 'SpacerBlock'
+ ),
+ 'rel' => 'spacer/index.php'
+ ),
'social-icons' => array(
'classes' => array(
'SocialIconsBlock',
@@ -288,29 +294,29 @@
),
'rel' => 'text/index.php'
),
- 'spacer' => array(
- 'classes' => array(
- 'SpacerBlock'
- ),
- 'rel' => 'spacer/index.php'
- ),
'video' => array(
'classes' => array(
'VideoBlock'
),
'rel' => 'video/index.php'
),
+ 'accordion-menu' => array(
+ 'classes' => array(
+ 'AccordionMenuBlock'
+ ),
+ 'rel' => 'menu/accordion-menu/index.php'
+ ),
'widgets-area' => array(
'classes' => array(
'WidgetAreaBlock'
),
'rel' => 'widgets-area/index.php'
),
- 'dropdown-menu' => array(
+ 'menu-items' => array(
'classes' => array(
- 'DropDownMenuBlock'
+ 'MenuItemsBlock'
),
- 'rel' => 'menu/dropdown-menu/index.php'
+ 'rel' => 'menu/menu-items/index.php'
),
'offscreen' => array(
'classes' => array(
@@ -318,11 +324,11 @@
),
'rel' => 'menu/offscreen/index.php'
),
- 'accordion-menu' => array(
+ 'dropdown-menu' => array(
'classes' => array(
- 'AccordionMenuBlock'
+ 'DropDownMenuBlock'
),
- 'rel' => 'menu/accordion-menu/index.php'
+ 'rel' => 'menu/dropdown-menu/index.php'
),
'offscreen-content' => array(
'classes' => array(
@@ -336,11 +342,11 @@
),
'rel' => 'accordion/blocks/accordion-item/index.php'
),
- 'menu-items' => array(
+ 'icon-list' => array(
'classes' => array(
- 'MenuItemsBlock'
+ 'IconListBlock'
),
- 'rel' => 'menu/menu-items/index.php'
+ 'rel' => 'icon-list/blocks/icon-list/index.php'
),
'down-arrow' => array(
'classes' => array(
@@ -348,12 +354,6 @@
),
'rel' => 'hero/blocks/down-arrow/index.php'
),
- 'icon-list' => array(
- 'classes' => array(
- 'IconListBlock'
- ),
- 'rel' => 'icon-list/blocks/icon-list/index.php'
- ),
'icon-list-item' => array(
'classes' => array(
'IconListItemBlock'
--- a/kubio/build/editor/index.asset.php
+++ b/kubio/build/editor/index.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('kubio-advanced-panel', 'kubio-ai', 'kubio-block-library', 'kubio-block-patterns', 'kubio-constants', 'kubio-controls', 'kubio-core', 'kubio-core-hooks', 'kubio-editor-data', 'kubio-global-data', 'kubio-icons', 'kubio-inspectors', 'kubio-log', 'kubio-menu-data', 'kubio-pro', 'kubio-style-manager', 'kubio-utils', 'kubio-wp-global-styles', 'lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '07e9e398a7820d149b23');
+<?php return array('dependencies' => array('kubio-advanced-panel', 'kubio-ai', 'kubio-block-library', 'kubio-block-patterns', 'kubio-constants', 'kubio-controls', 'kubio-core', 'kubio-core-hooks', 'kubio-editor-data', 'kubio-global-data', 'kubio-icons', 'kubio-inspectors', 'kubio-log', 'kubio-menu-data', 'kubio-pro', 'kubio-style-manager', 'kubio-utils', 'kubio-wp-global-styles', 'lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '02030a070f44c6535b0a');
--- a/kubio/build/third-party-blocks/manifest.php
+++ b/kubio/build/third-party-blocks/manifest.php
@@ -5,13 +5,13 @@
return array(
'core/post-content/support.json',
'core/widgets/archives/support.json',
- 'core/widgets/latest-comments/support.json',
'core/widgets/categories/support.json',
'core/widgets/calendar/support.json',
+ 'core/widgets/latest-comments/support.json',
'core/widgets/latest-posts/support.json',
- 'core/widgets/page-list/support.json',
- 'core/widgets/tag-cloud/support.json',
'core/widgets/search/support.json',
+ 'core/widgets/rss/support.json',
'core/widgets/social-icons/support.json',
- 'core/widgets/rss/support.json'
+ 'core/widgets/page-list/support.json',
+ 'core/widgets/tag-cloud/support.json'
);
--- a/kubio/lib/editor-assets.php
+++ b/kubio/lib/editor-assets.php
@@ -408,7 +408,6 @@
'aiWizardDescriptionOptional' => Flags::getSetting( 'aiWizardDescriptionOptional', false ),
'showFrontPageRevertNotice' => KubioFrontPageRevertNotice::getShowNoticeInEditor(),
'frontPageRevertBackupData' => KubioFrontPageRevertNotice::getInstance()->getFrontPageBackupData(),
- 'frontPageRevertNoticeNonce' => wp_create_nonce( KubioFrontPageRevertNotice::$nonceKey ),
'allow3rdPartyBlogOverride' => apply_filters( 'kubio/allow_3rd_party_blog_override', true ),
'kubioRecommendationSettings' => (object) kubio_get_recommendations_settings(),
'multilanguage' => array(
--- a/kubio/lib/src/Core/KubioFrontPageRevertNotice.php
+++ b/kubio/lib/src/Core/KubioFrontPageRevertNotice.php
@@ -24,9 +24,17 @@
add_action('wp_ajax_kubio_front_page_revert_action', array($this, 'onKeepKubioFrontPage'));
add_action('wp_ajax_kubio_restore_front_page', array($this, 'onRestoreUserFrontPage'));
add_action('rest_api_init', array($this, 'initRestApi'));
+ add_filter('kubio/kubio-utils-data/extras', array($this, 'addKubioUtilsData'));
}
+ public function addKubioUtilsData($data) {
+ if(!$this->getCurrentUserIsAdmin()) {
+ return $data;
+ }
+ $data['frontPageRevertNoticeNonce'] =wp_create_nonce( KubioFrontPageRevertNotice::$nonceKey );
+ return $data;
+ }
public function getFeatureIsEnabled() {
return apply_filters( 'kubio/front_page_revert_notice_is_enabled', false );
@@ -91,7 +99,7 @@
public function getCurrentUserIsAdmin()
{
- return is_user_logged_in() && current_user_can('manage_options');
+ return Utils::getCurrentUserIsAdmin();
}
public function getShowNoticeKey()
@@ -142,6 +150,9 @@
public function onKeepKubioFrontPage()
{
+ if ( ! $this->getCurrentUserIsAdmin() ) {
+ return;
+ }
check_ajax_referer(static::$nonceKey);
$this->cleanUpFlags();
wp_send_json_success();
@@ -150,6 +161,9 @@
public function onRestoreUserFrontPage()
{
+ if ( ! $this->getCurrentUserIsAdmin() ) {
+ return;
+ }
check_ajax_referer(static::$nonceKey);
$this->updateShowNoticeFlag(false);
$this->restoreWebsiteFrontPage();
--- a/kubio/lib/src/Core/Utils.php
+++ b/kubio/lib/src/Core/Utils.php
@@ -800,7 +800,10 @@
return false;
}
-
+ public static function getCurrentUserIsAdmin()
+ {
+ return is_user_logged_in() && current_user_can('manage_options');
+ }
public static function getThemeTemplateParts() {
$default_language = apply_filters( 'wpml_default_language', null );
$query = new WP_Query(
--- a/kubio/plugin.php
+++ b/kubio/plugin.php
@@ -6,7 +6,7 @@
* Description: Using the power of AI, Kubio gives you a head start by generating a first draft of your website, which you can further customize to your liking.
* Author: ExtendThemes
* Author URI: https://extendthemes.com
- * Version: 2.8.5
+ * Version: 2.8.6
* License: GPL3+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: kubio
@@ -50,8 +50,8 @@
return;
}
-define( 'KUBIO_VERSION', '2.8.5' );
-define( 'KUBIO_BUILD_NUMBER', '511' );
+define( 'KUBIO_VERSION', '2.8.6' );
+define( 'KUBIO_BUILD_NUMBER', '514' );
define( 'KUBIO_ENTRY_FILE', __FILE__ );
define( 'KUBIO_ROOT_DIR', plugin_dir_path( __FILE__ ) );