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
@@ -9,35 +9,47 @@
),
'rel' => 'accordion/blocks/accordion/index.php'
),
+ 'button' => array(
+ 'classes' => array(
+ 'ButtonBlock'
+ ),
+ 'rel' => 'button/index.php'
+ ),
'button-group' => array(
'classes' => array(
'ButtonGroupBlock'
),
'rel' => 'button-group/index.php'
),
+ 'contact-form' => array(
+ 'classes' => array(
+ 'ContactFormBlock'
+ ),
+ 'rel' => 'contact-form/index.php'
+ ),
'column' => array(
'classes' => array(
'ColumnBlock'
),
'rel' => 'column/index.php'
),
- 'button' => array(
+ 'copyright' => array(
'classes' => array(
- 'ButtonBlock'
+ 'CopyrightBlock'
),
- 'rel' => 'button/index.php'
+ 'rel' => 'copyright/index.php'
),
- 'contact-form' => array(
+ 'footer' => array(
'classes' => array(
- 'ContactFormBlock'
+ 'FooterTemplatePart'
),
- 'rel' => 'contact-form/index.php'
+ 'rel' => 'footer/index.php'
),
- 'copyright' => array(
+ 'header' => array(
'classes' => array(
- 'CopyrightBlock'
+ 'HeaderTemplatePart'
),
- 'rel' => 'copyright/index.php'
+ 'rel' => 'header/index.php'
),
'divider' => array(
'classes' => array(
@@ -45,30 +57,24 @@
),
'rel' => 'divider/index.php'
),
- 'footer' => array(
- 'classes' => array(
- 'FooterTemplatePart'
- ),
- 'rel' => 'footer/index.php'
- ),
'heading' => array(
'classes' => array(
'HeadingBlock'
),
'rel' => 'heading/index.php'
),
- 'header' => array(
- 'classes' => array(
- 'HeaderTemplatePart'
- ),
- 'rel' => 'header/index.php'
- ),
'home-button' => array(
'classes' => array(
'HomeButtonBlock'
),
'rel' => 'home-button/index.php'
),
+ 'hero' => array(
+ 'classes' => array(
+ 'HeroBlock'
+ ),
+ 'rel' => 'hero/index.php'
+ ),
'icon' => array(
'classes' => array(
'IconBlock'
@@ -81,12 +87,6 @@
),
'rel' => 'image/index.php'
),
- 'hero' => array(
- 'classes' => array(
- 'HeroBlock'
- ),
- 'rel' => 'hero/index.php'
- ),
'image-gallery' => array(
'classes' => array(
'ImageGalleryBlock',
@@ -100,32 +100,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(
+ 'link-group' => array(
'classes' => array(
- 'LogoBlock'
+ 'LinkGroupBlock'
),
- 'rel' => 'logo/index.php'
+ 'rel' => 'link-group/index.php'
),
- 'navigation' => array(
+ 'logo' => array(
'classes' => array(
- 'NavigationTopBarBlock',
- 'NavigationSectionBlock',
- 'NavigationItemsBlock',
- 'NavigationStickyItemsBlock'
+ 'LogoBlock'
),
- 'rel' => 'navigation/index.php'
+ 'rel' => 'logo/index.php'
),
'map' => array(
'classes' => array(
@@ -133,11 +124,14 @@
),
'rel' => 'map/index.php'
),
- 'pagination-nav-button' => array(
+ 'navigation' => array(
'classes' => array(
- 'PaginationNavButtonBlock'
+ 'NavigationTopBarBlock',
+ 'NavigationSectionBlock',
+ 'NavigationItemsBlock',
+ 'NavigationStickyItemsBlock'
),
- 'rel' => 'pagination-nav-button/index.php'
+ 'rel' => 'navigation/index.php'
),
'page-title' => array(
'classes' => array(
@@ -145,11 +139,11 @@
),
'rel' => 'page-title/index.php'
),
- 'post-author-bio' => array(
+ 'pagination-nav-button' => array(
'classes' => array(
- 'PostAuthorBioBlock'
+ 'PaginationNavButtonBlock'
),
- 'rel' => 'post-author-bio/index.php'
+ 'rel' => 'pagination-nav-button/index.php'
),
'pagination-numbers' => array(
'classes' => array(
@@ -175,30 +169,42 @@
),
'rel' => 'post-categories/index.php'
),
- 'post-excerpt' => array(
- 'classes' => array(
- 'PostExcerptBlock'
- ),
- 'rel' => 'post-excerpt/index.php'
- ),
'post-comments' => array(
'classes' => array(
'PostCommentsBlock'
),
'rel' => 'post-comments/index.php'
),
+ 'post-author-bio' => array(
+ 'classes' => array(
+ 'PostAuthorBioBlock'
+ ),
+ 'rel' => 'post-author-bio/index.php'
+ ),
'post-comments-form' => array(
'classes' => array(
'PostCommentsFormBlock'
),
'rel' => 'post-comments-form/index.php'
),
+ 'post-excerpt' => array(
+ 'classes' => array(
+ 'PostExcerptBlock'
+ ),
+ 'rel' => 'post-excerpt/index.php'
+ ),
'post-meta' => array(
'classes' => array(
'PostMetaBlock'
),
'rel' => 'post-meta/index.php'
),
+ 'post-featured-image' => array(
+ 'classes' => array(
+ 'PostFeaturedImageBlock'
+ ),
+ 'rel' => 'post-featured-image/index.php'
+ ),
'post-tags' => array(
'classes' => array(
'PostTagsBlock'
@@ -241,29 +247,23 @@
),
'rel' => 'search-form/index.php'
),
- 'section' => array(
- 'classes' => array(
- 'SectionBlock'
- ),
- 'rel' => 'section/index.php'
- ),
'shortcode' => array(
'classes' => array(
'ShortcodeBlock'
),
'rel' => 'shortcode/index.php'
),
- 'sidebar' => array(
+ 'section' => array(
'classes' => array(
- 'SidebarTemplatePart'
+ 'SectionBlock'
),
- 'rel' => 'sidebar/index.php'
+ 'rel' => 'section/index.php'
),
- 'spacer' => array(
+ 'sidebar' => array(
'classes' => array(
- 'SpacerBlock'
+ 'SidebarTemplatePart'
),
- 'rel' => 'spacer/index.php'
+ 'rel' => 'sidebar/index.php'
),
'social-icons' => array(
'classes' => array(
@@ -282,11 +282,11 @@
),
'rel' => 'tab/index.php'
),
- 'text' => array(
+ 'spacer' => array(
'classes' => array(
- 'TextBlock'
+ 'SpacerBlock'
),
- 'rel' => 'text/index.php'
+ 'rel' => 'spacer/index.php'
),
'video' => array(
'classes' => array(
@@ -294,17 +294,17 @@
),
'rel' => 'video/index.php'
),
- 'widgets-area' => array(
+ 'text' => array(
'classes' => array(
- 'WidgetAreaBlock'
+ 'TextBlock'
),
- 'rel' => 'widgets-area/index.php'
+ 'rel' => 'text/index.php'
),
- 'post-featured-image' => array(
+ 'widgets-area' => array(
'classes' => array(
- 'PostFeaturedImageBlock'
+ 'WidgetAreaBlock'
),
- 'rel' => 'post-featured-image/index.php'
+ 'rel' => 'widgets-area/index.php'
),
'accordion-menu' => array(
'classes' => array(
@@ -312,17 +312,23 @@
),
'rel' => 'menu/accordion-menu/index.php'
),
- 'dropdown-menu' => array(
+ 'menu-items' => array(
'classes' => array(
- 'DropDownMenuBlock'
+ 'MenuItemsBlock'
),
- 'rel' => 'menu/dropdown-menu/index.php'
+ 'rel' => 'menu/menu-items/index.php'
),
- 'accordion-item' => array(
+ 'offscreen' => array(
'classes' => array(
- 'AccordionItemBlock'
+ 'MenuOffscreen'
),
- 'rel' => 'accordion/blocks/accordion-item/index.php'
+ 'rel' => 'menu/offscreen/index.php'
+ ),
+ 'dropdown-menu' => array(
+ 'classes' => array(
+ 'DropDownMenuBlock'
+ ),
+ 'rel' => 'menu/dropdown-menu/index.php'
),
'offscreen-content' => array(
'classes' => array(
@@ -336,11 +342,11 @@
),
'rel' => 'hero/blocks/down-arrow/index.php'
),
- 'menu-items' => array(
+ 'accordion-item' => array(
'classes' => array(
- 'MenuItemsBlock'
+ 'AccordionItemBlock'
),
- 'rel' => 'menu/menu-items/index.php'
+ 'rel' => 'accordion/blocks/accordion-item/index.php'
),
'icon-list' => array(
'classes' => array(
@@ -348,12 +354,6 @@
),
'rel' => 'icon-list/blocks/icon-list/index.php'
),
- 'loop-item' => array(
- 'classes' => array(
- 'LoopItemBlock'
- ),
- 'rel' => 'query/blocks/loop-item/index.php'
- ),
'icon-list-item' => array(
'classes' => array(
'IconListItemBlock'
@@ -366,11 +366,11 @@
),
'rel' => 'query/blocks/loop/index.php'
),
- 'offscreen' => array(
+ 'loop-item' => array(
'classes' => array(
- 'MenuOffscreen'
+ 'LoopItemBlock'
),
- 'rel' => 'menu/offscreen/index.php'
+ 'rel' => 'query/blocks/loop-item/index.php'
),
'query' => array(
'classes' => array(
--- a/kubio/build/block-library/blocks/video/index.php
+++ b/kubio/build/block-library/blocks/video/index.php
@@ -42,6 +42,9 @@
$shortcodeContent = $this->getShortcode( $params );
$frontendAttributes = $this->getFrontendScriptAttributes();
+ $url = $this->getAttribute('posterImage.url');
+ $url = $this->getEscapedUrl($url);
+
return array(
self::VIDEO => array(
@@ -57,7 +60,7 @@
self::POSTER => array_merge(
array(
'style' => array(
- 'background-image' => "url({$this->getAttribute( 'posterImage.url' )})",
+ 'background-image' => "url($url)",
),
),
$frontendAttributes
@@ -65,6 +68,21 @@
);
}
+ public function getEscapedUrl($url) {
+ $url = esc_url($url);
+
+ // Allow only http/https
+ if (! empty($url)) {
+ $parsed = wp_parse_url($url);
+ if (! isset($parsed['scheme']) || ! in_array($parsed['scheme'], ['http', 'https'], true)) {
+ $url = '';
+ }
+ } else {
+ $url = '';
+ }
+
+ return $url;
+ }
public function getVideoParameters() {
$paramList = array( 'internalUrl', 'youtubeUrl', 'vimeoUrl', 'videoCategory', 'displayAs', 'playerOptions' );
$params = array();
@@ -339,8 +357,8 @@
function doVideo( $url, $attributes ) {
$poster_url = $this->getAttribute( 'posterImage.url' );
-
- if ( $poster_url ) {
+ $poster_url = $this->getEscapedUrl($poster_url);
+ if ( !empty($poster_url) ) {
$attributes .= ' poster="' . esc_url( $poster_url ) . '"';
}
@@ -348,7 +366,7 @@
'<video class="h-video-main" playsinline poster="%s" %s>' .
' <source src="%s" type="video/mp4" />' .
'</video>',
- $poster_url,
+ esc_attr($poster_url),
esc_attr( $attributes ),
esc_url( $url )
);
--- a/kubio/build/third-party-blocks/manifest.php
+++ b/kubio/build/third-party-blocks/manifest.php
@@ -4,14 +4,14 @@
return array(
'core/widgets/archives/support.json',
- 'core/widgets/latest-comments/support.json',
'core/widgets/categories/support.json',
- 'core/widgets/latest-posts/support.json',
- 'core/widgets/rss/support.json',
'core/widgets/calendar/support.json',
- 'core/widgets/page-list/support.json',
- 'core/widgets/search/support.json',
+ 'core/widgets/latest-comments/support.json',
'core/post-content/support.json',
+ 'core/widgets/latest-posts/support.json',
+ 'core/widgets/page-list/support.json',
'core/widgets/social-icons/support.json',
+ 'core/widgets/search/support.json',
+ 'core/widgets/rss/support.json',
'core/widgets/tag-cloud/support.json'
);
--- 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.7.0
+ * Version: 2.7.1
* 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.7.0' );
-define( 'KUBIO_BUILD_NUMBER', '460' );
+define( 'KUBIO_VERSION', '2.7.1' );
+define( 'KUBIO_BUILD_NUMBER', '462' );
define( 'KUBIO_ENTRY_FILE', __FILE__ );
define( 'KUBIO_ROOT_DIR', plugin_dir_path( __FILE__ ) );