Better Notifications for WordPress - Version 1.8.11

Version Description

  • 15th February 2022 =
  • Fixed: An issue where add-on licenses couldn't be saved.
  • Fixed: Some HTML characters were being encoded when added through the Text part of the notification editor.
  • Improved: Further improvements to plugin structure, data sanitisation, and validation.
Download this release

Release Info

Developer voltronik
Plugin Icon 128x128 Better Notifications for WordPress
Version 1.8.11
Comparing to
See all releases

Code changes from version 1.8.10 to 1.8.11

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: notification, email, alert, message, notify, send, HTML, customize, bulk,
5
  Requires at least: 4.8
6
  Tested up to: 5.9
7
  Requires PHP: 7.0
8
- Stable tag: 1.8.10
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Update URI: https://wordpress.org/plugins/bnfw/
@@ -242,6 +242,11 @@ Yes, of course! The plugin is completely translation-friendly and if you send me
242
 
243
  == Changelog ==
244
 
 
 
 
 
 
245
  = 1.8.10 - 8th February 2022 =
246
  * Fixed: A fatal error when sending an email address changed notification.
247
 
5
  Requires at least: 4.8
6
  Tested up to: 5.9
7
  Requires PHP: 7.0
8
+ Stable tag: 1.8.11
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Update URI: https://wordpress.org/plugins/bnfw/
242
 
243
  == Changelog ==
244
 
245
+ = 1.8.11 - 15th February 2022 =
246
+ * Fixed: An issue where add-on licenses couldn't be saved.
247
+ * Fixed: Some HTML characters were being encoded when added through the Text part of the notification editor.
248
+ * Improved: Further improvements to plugin structure, data sanitisation, and validation.
249
+
250
  = 1.8.10 - 8th February 2022 =
251
  * Fixed: A fatal error when sending an email address changed notification.
252
 
bnfw.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Better Notifications for WP
4
  * Plugin URI: https://wordpress.org/plugins/bnfw/
5
  * Description: Supercharge your WordPress notifications using a WYSIWYG editor and shortcodes. Default and new notifications available. Add more power with Add-ons.
6
- * Version: 1.8.10
7
  * Requires at least: 4.8
8
  * Requires PHP: 7.0
9
  * Author: Made with Fuel
@@ -39,7 +39,7 @@ if ( ! class_exists( 'BNFW', false ) ) {
39
  *
40
  * @var string
41
  */
42
- public $bnfw_version = '1.8.10';
43
  /**
44
  * Class Constructor.
45
  *
3
  * Plugin Name: Better Notifications for WP
4
  * Plugin URI: https://wordpress.org/plugins/bnfw/
5
  * Description: Supercharge your WordPress notifications using a WYSIWYG editor and shortcodes. Default and new notifications available. Add more power with Add-ons.
6
+ * Version: 1.8.11
7
  * Requires at least: 4.8
8
  * Requires PHP: 7.0
9
  * Author: Made with Fuel
39
  *
40
  * @var string
41
  */
42
+ public $bnfw_version = '1.8.11';
43
  /**
44
  * Class Constructor.
45
  *
includes/admin/class-bnfw-notification.php CHANGED
@@ -794,7 +794,7 @@ if ( ! class_exists( 'BNFW_Notification', false ) ) {
794
  $setting = array(
795
  'notification' => isset( $_POST['notification'] ) ? sanitize_text_field( wp_unslash( $_POST['notification'] ) ) : '',
796
  'subject' => $subject,
797
- 'message' => isset( $_POST['notification_message'] ) ? wp_kses_post( wp_unslash( $_POST['notification_message'] ) ) : '',
798
  'disabled' => isset( $_POST['disabled'] ) ? sanitize_text_field( wp_unslash( $_POST['disabled'] ) ) : 'false',
799
  'email-formatting' => isset( $_POST['email-formatting'] ) ? sanitize_text_field( wp_unslash( $_POST['email-formatting'] ) ) : 'html',
800
  'disable-current-user' => isset( $_POST['disable-current-user'] ) ? sanitize_text_field( wp_unslash( $_POST['disable-current-user'] ) ) : 'false',
794
  $setting = array(
795
  'notification' => isset( $_POST['notification'] ) ? sanitize_text_field( wp_unslash( $_POST['notification'] ) ) : '',
796
  'subject' => $subject,
797
+ 'message' => isset( $_POST['notification_message'] ) ? wp_unslash( $_POST['notification_message'] ) : '', // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
798
  'disabled' => isset( $_POST['disabled'] ) ? sanitize_text_field( wp_unslash( $_POST['disabled'] ) ) : 'false',
799
  'email-formatting' => isset( $_POST['email-formatting'] ) ? sanitize_text_field( wp_unslash( $_POST['email-formatting'] ) ) : 'html',
800
  'disable-current-user' => isset( $_POST['disable-current-user'] ) ? sanitize_text_field( wp_unslash( $_POST['disable-current-user'] ) ) : 'false',
includes/helpers/helpers.php CHANGED
File without changes
includes/license/class-bnfw-license-setting.php CHANGED
@@ -70,7 +70,7 @@ if ( ! class_exists( 'BNFW_License_Setting', false ) ) {
70
  </div>
71
 
72
  <?php
73
- echo wp_kses( ob_get_clean(), $allowed_html );
74
  }
75
  /**
76
  * BNFW license settings.
70
  </div>
71
 
72
  <?php
73
+ echo ob_get_clean();// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
74
  }
75
  /**
76
  * BNFW license settings.
includes/license/class-bnfw-license.php CHANGED
@@ -204,7 +204,7 @@ if ( ! class_exists( 'BNFW_License', false ) ) {
204
  return;
205
  }
206
 
207
- $license = sanitize_text_field( $_POST['bnfw_licenses'][ $this->item_shortname . '_license_key' ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
208
 
209
  // Data to send to the API.
210
  $api_params = array(
@@ -284,7 +284,7 @@ if ( ! class_exists( 'BNFW_License', false ) ) {
284
  // Decode the license data.
285
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
286
 
287
- if ( 'deactivated' === $license_data->license ) {
288
  delete_option( $this->item_shortname . '_license_active' );
289
  }
290
  }
204
  return;
205
  }
206
 
207
+ $license = sanitize_text_field( $_POST['bnfw_licenses'][ $this->item_shortname . '_license_key' ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
208
 
209
  // Data to send to the API.
210
  $api_params = array(
284
  // Decode the license data.
285
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
286
 
287
+ if ( 'deactivated' === (string) $license_data->license ) {
288
  delete_option( $this->item_shortname . '_license_active' );
289
  }
290
  }
includes/overrides.php CHANGED
File without changes