Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/ays-popup-box/admin/partials/actions/ays-pb-admin-actions.php
+++ b/ays-popup-box/admin/partials/actions/ays-pb-admin-actions.php
@@ -4,11 +4,19 @@
$ays_pb_tab = isset($_GET['ays_pb_tab']) ? sanitize_text_field($_GET['ays_pb_tab']) : 'tab1';
if (isset($_POST['ays_submit']) || isset($_POST['ays_submit_top'])) {
+ // CSRF protection: verify nonce and referer before processing
+ if ( ! isset($_POST['pb_action']) || ! check_admin_referer( 'pb_action', 'pb_action' ) ) {
+ wp_die( 'Invalid request.' );
+ }
$_POST['id'] = $id;
$this->popupbox_obj->add_or_edit_popupbox();
}
if (isset($_POST['ays_apply']) || isset($_POST['ays_apply_top'])) {
+ // CSRF protection: verify nonce and referer before processing
+ if ( ! isset($_POST['pb_action']) || ! check_admin_referer( 'pb_action', 'pb_action' ) ) {
+ wp_die( 'Invalid request.' );
+ }
$_POST['id'] = $id;
$_POST['submit_type'] = 'apply';
$this->popupbox_obj->add_or_edit_popupbox();
@@ -8693,7 +8701,7 @@
'background-size' : pb_bg_image_sizing,
'background-position' : pb_bg_image_position
});
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#ays-pb-close-button-text").on('change', function () {
if($("#ays-pb-close-button-text").val() == '✕'){
@@ -8743,7 +8751,7 @@
'background-size' : pb_bg_image_sizing,
'background-position' : pb_bg_image_position
});
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(ays_pb_view_type).css({
'background-color': $("#<?php echo esc_attr($this->plugin_name); ?>-bgcolor").val(),
@@ -8775,7 +8783,7 @@
'background-size' : pb_bg_image_sizing,
'background-position' : pb_bg_image_position
});
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(ays_pb_view_type).css({
'background-color': $("#<?php echo esc_attr($this->plugin_name); ?>-bgcolor").val(),
@@ -8807,7 +8815,7 @@
'background-size' : pb_bg_image_sizing,
'background-position' : pb_bg_image_position
});
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(ays_pb_view_type).css({
'background-color': $("#<?php echo esc_attr($this->plugin_name); ?>-bgcolor").val(),
@@ -8833,7 +8841,7 @@
$(document).find(".ays-pb-live-container-main.ays_winxp_window").addClass('ays_active');
ays_pb_view_type = '.ays_winxp_window';
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find(ays_pb_view_type + ' .ays_winxp_content').css({
'background-color': $("#<?php echo esc_attr($this->plugin_name); ?>-bgcolor").val()
@@ -8873,7 +8881,7 @@
'background-size' : pb_bg_image_sizing,
'background-position' : pb_bg_image_position
});
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#ays-pb-close-button-text").on('change', function () {
$(ays_pb_view_type + ' .ays-close-button-text').html($("#ays-pb-close-button-text").val());
@@ -8908,7 +8916,7 @@
$(document).find(".ays-pb-live-container-main.ays_lil_window").addClass('ays_active');
ays_pb_view_type = '.ays_lil_window';
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#ays-pb-close-button-text").on('change', function () {
$(ays_pb_view_type + ' .ays-close-button-text').html($("#ays-pb-close-button-text").val());
@@ -8948,7 +8956,7 @@
$(document).find(".ays-pb-live-container-main.ays_image_window").addClass('ays_active');
ays_pb_view_type = '.ays_image_window';
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#ays-pb-close-button-text").on('change', function () {
$(ays_pb_view_type + ' .ays-close-button-text').html($("#ays-pb-close-button-text").val());
@@ -8988,7 +8996,7 @@
ays_pb_view_type = '.ays_minimal_window';
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#ays-pb-close-button-text").on('change', function () {
@@ -9030,7 +9038,7 @@
$(document).find(".ays-pb-live-container-main.ays_template_window").addClass('ays_active');
ays_pb_view_type = '.ays_template_window';
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#ays-pb-close-button-text").on('change', function () {
$(ays_pb_view_type + ' .ays-close-button-text').html($("#ays-pb-close-button-text").val());
@@ -9077,7 +9085,7 @@
'background-size' : pb_bg_image_sizing,
'background-position' : pb_bg_image_position
});
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#ays-pb-close-button-text").on('change', function () {
$(ays_pb_view_type + ' .ays-close-button-text').html($("#ays-pb-close-button-text").val());
@@ -9114,7 +9122,7 @@
'background-position' : pb_bg_image_position
});
ays_pb_view_type = '.ays-pb-modal';
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#ays-pb-close-button-text").on('change', function () {
$(ays_pb_view_type + ' .ays-close-button-text').html($("#ays-pb-close-button-text").val());
@@ -9150,7 +9158,7 @@
'font-family': $('#ays_pb_font_family').val(),
});
- $(document).find(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(document).find(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
$(document).find(ays_pb_view_type + ' .ays_title').html( pbTitle );
$(document).find("#<?php echo esc_attr($this->plugin_name); ?>-popup_title").on('change', function () {
@@ -9160,7 +9168,7 @@
$(ays_pb_view_type + ' .ays_title').html( pbTitle );
});
$(document).find("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").on('change', function () {
- $(ays_pb_view_type + ' .desc').html($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
+ $(ays_pb_view_type + ' .desc').text($("#<?php echo esc_attr($this->plugin_name); ?>-popup_description").val());
});
$(document).find("#ays-pb-close-button-text").on('change', function () {
let $this = $(document).find('.ays-pb-modal .ays-close-button-text');
--- a/ays-popup-box/ays-pb.php
+++ b/ays-popup-box/ays-pb.php
@@ -16,7 +16,7 @@
* Plugin Name: Popup Box
* Plugin URI: http://ays-pro.com/wordpress/popup-box
* Description: Pop up anything you want! Create informative and promotional popups all in one plugin. Boost your website traffic with eye-catching popups.
- * Version: 5.4.9
+ * Version: 5.5.0
* Author: Popup Box Team
* Author URI: http://ays-pro.com/
* License: GPL-2.0+
@@ -35,7 +35,7 @@
* Start at version 1.0.0 and use SemVer - https://semver.org
* Rename this for your plugin and update it as you release new versions.
*/
-define( 'AYS_PB_NAME_VERSION', '5.4.9' );
+define( 'AYS_PB_NAME_VERSION', '5.5.0' );
define( 'AYS_PB_NAME', 'ays-pb' );
if( ! defined( 'AYS_PB_ADMIN_URL' ) ) {
@@ -113,12 +113,12 @@
</a>
<div class="popup-box-notice-one-time">(<?php echo esc_html__("One-time payment", "ays-popup-box"); ?>)</div>
</div>
- <div class="ays-pb-coupon-container">
+ <!-- <div class="ays-pb-coupon-container">
<div class="ays-pb-coupon-box ays-pb-copy-element-box-parent">
<span onClick="selectAndCopyElementContents(this)" class="ays-pb-copy-element-box" data-toggle="tooltip" title="<?php echo esc_html__( "Click for copy", 'ays-popup-box' ); ?>"><?php echo esc_html__( "summer2025", 'ays-popup-box' ); ?></span>
</div>
<span class="ays-pb-logo-container-one-time-text"><?php echo esc_html__( "Extra 20% Coupon", 'ays-popup-box' ); ?></span>
- </div>
+ </div> -->
</div>
<ul id="menu">
<li class="modile-ddmenu-lg"><a class="ays-btn" href="https://popup-plugin.com/pricing/" target="_blank"><?php echo esc_html__("Pricing", "ays-popup-box"); ?></a></li>
--- a/ays-popup-box/includes/class-ays-pb-data.php
+++ b/ays-popup-box/includes/class-ays-pb-data.php
@@ -732,16 +732,16 @@
$content[] = '</div>';
- $content[] = '<div class="ays-pb-dicount-wrap-box ays-pb-coupon-wrap-button-box">';
- $content[] = '<div class="ays-pb-coupon-container">';
- $content[] = '<div class="ays-pb-coupon-row ays-pb-shortcode-box" onClick="selectAndCopyElementContents(this)" class="ays-pb-copy-element-box" data-toggle="tooltip" title="'. esc_html__('Click for copy.','ays-pb') .'">';
- $content[] = 'summer2025';
- $content[] = '</div>';
- $content[] = '<div class="ays-pb-coupon-text-row">';
- $content[] = __( "20% Extra Discount", 'ays-pb' );
- $content[] = '</div>';
- $content[] = '</div>';
- $content[] = '</div>';
+ // $content[] = '<div class="ays-pb-dicount-wrap-box ays-pb-coupon-wrap-button-box">';
+ // $content[] = '<div class="ays-pb-coupon-container">';
+ // $content[] = '<div class="ays-pb-coupon-row ays-pb-shortcode-box" onClick="selectAndCopyElementContents(this)" class="ays-pb-copy-element-box" data-toggle="tooltip" title="'. esc_html__('Click for copy.','ays-pb') .'">';
+ // $content[] = 'summer2025';
+ // $content[] = '</div>';
+ // $content[] = '<div class="ays-pb-coupon-text-row">';
+ // $content[] = __( "20% Extra Discount", 'ays-pb' );
+ // $content[] = '</div>';
+ // $content[] = '</div>';
+ // $content[] = '</div>';
$content[] = '<div class="ays-pb-dicount-wrap-box ays-pb-dicount-wrap-button-box">';
$content[] = sprintf('<a href="%s" class="button button-primary ays-button" id="ays-button-top-buy-now" target="_blank">%s</a>', esc_url("https://popup-plugin.com/pricing?utm_source=dashboard&utm_medium=popup-free&utm_campaign=sale-banner-".AYS_PB_NAME_VERSION), esc_html__( 'Buy Now', "ays-popup-box" ));