Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/greenshift-animation-and-page-builder-blocks/build/gspbLibrary.asset.php
+++ b/greenshift-animation-and-page-builder-blocks/build/gspbLibrary.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '713429a8b4a8cf06d144');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'f6728c4da65e41213b08');
--- a/greenshift-animation-and-page-builder-blocks/build/gspbSiteEditor.asset.php
+++ b/greenshift-animation-and-page-builder-blocks/build/gspbSiteEditor.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '16b3fa344b30c1a97e5e');
+<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '31d342c8b92a172d8d9e');
--- a/greenshift-animation-and-page-builder-blocks/build/index.asset.php
+++ b/greenshift-animation-and-page-builder-blocks/build/index.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '8c60cb402c79a65d61b6');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '76812a4718b26aed158b');
--- a/greenshift-animation-and-page-builder-blocks/includes/helper.php
+++ b/greenshift-animation-and-page-builder-blocks/includes/helper.php
@@ -1255,6 +1255,12 @@
$value = str_replace('{{POST_TITLE}}', esc_html($post->post_title), $value);
}
}
+ if (strpos($value, '{{POST_EXCERPT}}') !== false){
+ global $post;
+ if(!empty($post) && is_object($post)){
+ $value = str_replace('{{POST_EXCERPT}}', esc_html($post->post_excerpt), $value);
+ }
+ }
if (strpos($value, '{{POST_URL}}') !== false){
global $post;
if(!empty($post) && is_object($post)){
--- a/greenshift-animation-and-page-builder-blocks/init.php
+++ b/greenshift-animation-and-page-builder-blocks/init.php
@@ -104,6 +104,21 @@
// Hook: Frontend assets.
add_action('init', 'gspb_greenShift_register_scripts_blocks');
add_filter('render_block', 'gspb_greenShift_block_script_assets', 10, 2);
+add_filter('register_block_type_args', 'gspb_enable_full_align_for_html_block', 10, 2);
+function gspb_enable_full_align_for_html_block($args, $block_type)
+{
+ if ('core/html' !== $block_type) {
+ return $args;
+ }
+
+ if (empty($args['supports']) || !is_array($args['supports'])) {
+ $args['supports'] = array();
+ }
+
+ $args['supports']['align'] = array('wide', 'full');
+
+ return $args;
+}
$enable_head_inline = !empty($global_gs_options['enable_head_inline']) ? $global_gs_options['enable_head_inline'] : '';
//$enable_head_inline = function_exists('wp_is_block_theme') && wp_is_block_theme();
@@ -703,7 +718,7 @@
'gspb_api',
GREENSHIFT_DIR_URL . 'libs/api/index.js',
array(),
- '1.8',
+ '1.9',
true
);
@@ -741,25 +756,25 @@
'greenShift-library-editor',
GREENSHIFT_DIR_URL . 'build/gspbLibrary.css',
'',
- '12.8'
+ '12.9'
);
wp_register_style(
'greenShift-block-css', // Handle.
GREENSHIFT_DIR_URL . 'build/index.css', // Block editor CSS.
array('greenShift-library-editor', 'wp-edit-blocks'),
- '12.8'
+ '12.9'
);
wp_register_style(
'greenShift-stylebook-css', // Handle.
GREENSHIFT_DIR_URL . 'build/gspbStylebook.css', // Block editor CSS.
array(),
- '12.8'
+ '12.9'
);
wp_register_style(
'greenShift-admin-css', // Handle.
GREENSHIFT_DIR_URL . 'templates/admin/style.css', // admin css
array(),
- '12.8'
+ '12.9'
);
//Script for ajax reusable loading
@@ -886,7 +901,11 @@
wp_enqueue_style('gsslightboxfront');
}
if(!empty($block['attrs']['disablelazy'])){
- $html = str_replace('src=', 'fetchpriority="high" src=', $html);
+ $p = new WP_HTML_Tag_Processor( $html );
+ if ( $p->next_tag( 'img' ) ) {
+ $p->set_attribute( 'fetchpriority', 'high' );
+ $html = $p->get_updated_html();
+ }
}
if(!empty($block['attrs']['href'])){
$html = str_replace('rel="noopener"', '', $html);
@@ -966,9 +985,9 @@
$openlabel = !empty($block['attrs']['openlabel']) ? esc_attr($block['attrs']['openlabel']) : 'Show more';
$closelabel = !empty($block['attrs']['closelabel']) ? esc_attr($block['attrs']['closelabel']) : 'Show less';
- $html = str_replace('class="gs-toggler-wrapper"', 'class="gs-toggler-wrapper"'. ' id="'.$id.'"', $html);
- $html = str_replace('class="gs-tgl-show"', 'class="gs-tgl-show"'. ' tabindex="0" role="button" aria-label="'.$openlabel.'" aria-controls="'.$id.'"', $html);
- $html = str_replace('class="gs-tgl-hide"', 'class="gs-tgl-hide"'. ' tabindex="0" role="button" aria-label="'.$closelabel.'" aria-controls="'.$id.'"', $html);
+ $html = str_replace('class="gs-toggler-wrapper"', 'class="gs-toggler-wrapper"'. ' id="'.esc_attr($id).'"', $html);
+ $html = str_replace('class="gs-tgl-show"', 'class="gs-tgl-show"'. ' tabindex="0" role="button" aria-label="'.esc_attr($openlabel).'" aria-controls="'.esc_attr($id).'"', $html);
+ $html = str_replace('class="gs-tgl-hide"', 'class="gs-tgl-hide"'. ' tabindex="0" role="button" aria-label="'.esc_attr($closelabel).'" aria-controls="'.esc_attr($id).'"', $html);
}
// looking for counter
@@ -1050,7 +1069,7 @@
wp_enqueue_script('gsslidingpanel');
if($blockname == 'greenshift-blocks/button'){
$position = !empty($block['attrs']['slidePosition']) ? esc_attr($block['attrs']['slidePosition']) : '';
- $html = str_replace('id="gspb_button-id-' . $block['attrs']['id'], 'data-paneltype="' . $position . '" id="gspb_button-id-' . greenshift_sanitize_id_key($block['attrs']['id']), $html);
+ $html = str_replace('id="gspb_button-id-' . $block['attrs']['id'], 'data-paneltype="' . esc_attr($position) . '" id="gspb_button-id-' . greenshift_sanitize_id_key($block['attrs']['id']), $html);
$html = str_replace('class="gspb_slidingPanel"', 'data-panelid="gspb_button-id-' . greenshift_sanitize_id_key($block['attrs']['id']) . '" class="gspb_slidingPanel"', $html);
}
if($blockname == 'greenshift-blocks/buttonbox'){
@@ -1066,7 +1085,7 @@
}
$linknew = apply_filters('greenshiftseo_url_filter', $link);
$linknew = apply_filters('rh_post_offer_url_filter', $linknew);
- $html = str_replace($link, $linknew, $html);
+ $html = str_replace($link, esc_url($linknew), $html);
}
if (function_exists('GSPB_make_dynamic_link') && !empty($block['attrs']['dynamicEnable'])) {
$field = !empty($block['attrs']['dynamicField']) ? $block['attrs']['dynamicField'] : '';
@@ -1075,8 +1094,9 @@
$replacedlink = GSPB_get_value_from_array_field($repeaterField, $block['attrs']['repeaterArray']);
$replacedlink = GSPB_field_array_to_value($replacedlink, ', ');
$replacedlink = apply_filters('greenshiftseo_url_filter', $replacedlink);
+ $replacedlink = esc_url($replacedlink);
if($replacedlink){
- $html = preg_replace('/hrefs*=s*"([^"]*)"/i', 'href="' . $replacedlink . '"', $html);
+ $html = preg_replace('/hrefs*=s*"([^"]*)"/i', 'href="' . esc_url($replacedlink) . '"', $html);
}
} else {
$html = GSPB_make_dynamic_link($html, $block['attrs'], $block, $field, $block['attrs']['buttonLink']);
@@ -2683,7 +2703,7 @@
'methods' => 'POST',
'callback' => 'gspb_update_global_wp_settings',
'permission_callback' => function () {
- return current_user_can('edit_posts');
+ return current_user_can('manage_options');
},
'args' => array(),
),
--- a/greenshift-animation-and-page-builder-blocks/plugin.php
+++ b/greenshift-animation-and-page-builder-blocks/plugin.php
@@ -6,7 +6,7 @@
* Author: Wpsoul
* Author URI: https://greenshiftwp.com
* Plugin URI: https://greenshiftwp.com
- * Version: 12.8.9
+ * Version: 12.9.0
* Text Domain: greenshift-animation-and-page-builder-blocks
* License: GPL2+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
--- a/greenshift-animation-and-page-builder-blocks/settings.php
+++ b/greenshift-animation-and-page-builder-blocks/settings.php
@@ -1076,15 +1076,14 @@
</td>
<td>
<select name="openaiapimodel">
- <option value="gpt-5.2" <?php selected($openaiapimodel, 'gpt-5.2'); ?>> gpt-5.2 </option>
- <option value="gpt-5.2-pro" <?php selected($openaiapimodel, 'gpt-5.2-pro'); ?>> gpt-5.2-pro </option>
- <option value="gemini-3-flash-preview" <?php selected($openaiapimodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
- <option value="gemini-2.5-flash" <?php selected($openaiapimodel, 'gemini-2.5-flash'); ?>> gemini-2.5-flash </option>
-
+ <option value="gpt-5.4" <?php selected($openaiapimodel, 'gpt-5.4'); ?>> gpt-5.4 </option>
+ <option value="gpt-5.4-mini" <?php selected($openaiapimodel, 'gpt-5.4-mini'); ?>> gpt-5.4-mini </option>
<option value="gemini-3.1-pro-preview" <?php selected($openaiapimodel, 'gemini-3.1-pro-preview'); ?>> gemini-3.1-pro-preview </option>
+ <option value="gemini-3-flash-preview" <?php selected($openaiapimodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
+ <option value="gemini-3.1-flash-lite-preview" <?php selected($openaiapimodel, 'gemini-3.1-flash-lite-preview'); ?>> gemini-3.1-flash-lite-preview </option>
+ <option value="claude-opus-4-6" <?php selected($openaiapimodel, 'claude-opus-4-6'); ?>> claude-opus-4-6 </option>
<option value="claude-sonnet-4-6" <?php selected($openaiapimodel, 'claude-sonnet-4-6'); ?>> claude-sonnet-4-6 </option>
<option value="claude-haiku-4-5" <?php selected($openaiapimodel, 'claude-haiku-4-5'); ?>> claude-haiku-4-5 </option>
- <option value="claude-opus-4-6" <?php selected($openaiapimodel, 'claude-opus-4-6'); ?>> claude-opus-4-6 </option>
<option value="deepseek-chat" <?php selected($openaiapimodel, 'deepseek-chat'); ?>> deepseek-chat </option>
</select>
</td>
@@ -1095,17 +1094,15 @@
</td>
<td>
<select name="aihelpermodel">
- <option value="gpt-5.2" <?php selected($aihelpermodel, 'gpt-5.2'); ?>> gpt-5.2 </option>
- <option value="gpt-5" <?php selected($aihelpermodel, 'gpt-5'); ?>> gpt-5 </option>
- <option value="gpt-5.2-pro" <?php selected($aihelpermodel, 'gpt-5.2-pro'); ?>> gpt-5.2-pro </option>
- <option value="gemini-3-flash-preview" <?php selected($aihelpermodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
-
-
+ <option value="gpt-5.4" <?php selected($aihelpermodel, 'gpt-5.4'); ?>> gpt-5.4 </option>
+ <option value="gpt-5.4-mini" <?php selected($aihelpermodel, 'gpt-5.4-mini'); ?>> gpt-5.4-mini </option>
<option value="gemini-3.1-pro-preview" <?php selected($aihelpermodel, 'gemini-3.1-pro-preview'); ?>> gemini-3.1-pro-preview </option>
- <option value="gemini-2.5-flash" <?php selected($aihelpermodel, 'gemini-2.5-flash'); ?>> gemini-2.5-flash </option>
- <option value="claude-haiku-4-5" <?php selected($aihelpermodel, 'claude-haiku-4-5'); ?>> claude-haiku-4-5 </option>
- <option value="claude-sonnet-4-6" <?php selected($aihelpermodel, 'claude-sonnet-4-6'); ?>> claude-sonnet-4-6 </option>
+ <option value="gemini-3-flash-preview" <?php selected($aihelpermodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
+ <option value="gemini-3.1-flash-lite-preview" <?php selected($aihelpermodel, 'gemini-3.1-flash-lite-preview'); ?>> gemini-3.1-flash-lite-preview </option>
<option value="claude-opus-4-6" <?php selected($aihelpermodel, 'claude-opus-4-6'); ?>> claude-opus-4-6 </option>
+ <option value="claude-sonnet-4-6" <?php selected($aihelpermodel, 'claude-sonnet-4-6'); ?>> claude-sonnet-4-6 </option>
+ <option value="claude-haiku-4-5" <?php selected($aihelpermodel, 'claude-haiku-4-5'); ?>> claude-haiku-4-5 </option>
+ <option value="deepseek-chat" <?php selected($aihelpermodel, 'deepseek-chat'); ?>> deepseek-chat </option>
</select>
</td>
@@ -1118,28 +1115,12 @@
<select name="aiimagemodel">
<option value="gemini-3.1-flash-image-preview" <?php selected($aiimagemodel, 'gemini-3.1-flash-image-preview'); ?>> Google Flash 3.1 </option>
<option value="gemini-3-pro-image-preview" <?php selected($aiimagemodel, 'gemini-3-pro-image-preview'); ?>> Google Pro 3 Preview </option>
- <option value="gpt-image-1" <?php selected($aiimagemodel, 'gpt-image-1'); ?>> GPT Image 1.5 </option>
+ <option value="gpt-image-1" <?php selected($aiimagemodel, 'gpt-image-1'); ?>> GPT Image 1 </option>
<option value="gpt-image-1.5" <?php selected($aiimagemodel, 'gpt-image-1.5'); ?>> GPT Image 1.5 </option>
</select>
</td>
</tr>
- <tr class="aidesignmodel">
- <td>
- <label for="aidesignmodel"><?php esc_html_e("AI Design Model", 'greenshift-animation-and-page-builder-blocks'); ?></label>
- </td>
- <td>
- <select name="aidesignmodel">
- <option value="claude-haiku-4-5" <?php selected($aidesignmodel, 'claude-haiku-4-5'); ?>> claude-haiku-4-5 </option>
- <option value="claude-sonnet-4-6" <?php selected($aidesignmodel, 'claude-sonnet-4-6'); ?>> claude-sonnet-4-6 </option>
- <option value="claude-opus-4-6" <?php selected($aidesignmodel, 'claude-opus-4-6'); ?>> claude-opus-4-6 </option>
- <option value="gemini-3-flash-preview" <?php selected($aidesignmodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
- <option value="gemini-3.1-pro-preview" <?php selected($aidesignmodel, 'gemini-3.1-pro-preview'); ?>> gemini-3.1-pro-preview </option>
-
-
- </select>
- </td>
- </tr>
</tbody>
</table>
@@ -1433,10 +1414,10 @@
for ($i = 0; (int)$data['fonts_count'] > $i; $i++) {
//$item_arr = ['label' => sanitize_text_field($data['font_specific_style_name'][$i])];
foreach ($this->allowed_font_ext as $ext) {
- $item_arr[$ext] = !empty($fonts_urls[$i][$ext]) ? $fonts_urls[$i][$ext] : sanitize_text_field($data[$ext][$i]);
+ $item_arr[$ext] = !empty($fonts_urls[$i][$ext]) ? $fonts_urls[$i][$ext] : sanitize_text_field(wp_unslash($data[$ext][$i]));
}
- $item_arr['preloaded'] = !empty($data['font_family_preload'][$i]) ? sanitize_text_field($data['font_family_preload'][$i]) : '';
- $arr[sanitize_text_field($data['font_family_name'][$i])] = $item_arr;
+ $item_arr['preloaded'] = !empty($data['font_family_preload'][$i]) ? sanitize_text_field(wp_unslash($data['font_family_preload'][$i])) : '';
+ $arr[sanitize_text_field(wp_unslash($data['font_family_name'][$i]))] = $item_arr;
}
$new_localfont = json_encode($arr);
$global_settings['localfont'] = $new_localfont;