Easy WP SMTP - Version 1.5.1

Version Description

  • Removed the special Clicky plugin compatibility code as it is no longer necessary.
  • Removed the use of deprecated FILTER_SANITIZE_STRING.
  • Added sanitization to input fields(that were missing it).
Download this release

Release Info

Developer wp.insider
Plugin Icon 128x128 Easy WP SMTP
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

Files changed (3) hide show
  1. class-easywpsmtp-admin.php +4 -20
  2. easy-wp-smtp.php +2 -2
  3. readme.txt +7 -2
class-easywpsmtp-admin.php CHANGED
@@ -7,15 +7,6 @@ class EasyWPSMTP_Admin {
7
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
8
  }
9
 
10
- public function remove_conflicting_scripts() {
11
- $html = ob_get_clean();
12
- if ( defined( 'CLICKY_PLUGIN_DIR_URL' ) ) {
13
- $expr = '/^(.*)' . preg_quote( CLICKY_PLUGIN_DIR_URL, '/' ) . '(.*)$/m';
14
- $html = preg_replace( $expr, '', $html );
15
- }
16
- echo $html;
17
- }
18
-
19
  public function admin_enqueue_scripts( $hook ) {
20
  // Load only on ?page=swpsmtp_settings
21
  if ( 'settings_page_swpsmtp_settings' !== $hook ) {
@@ -46,13 +37,6 @@ class EasyWPSMTP_Admin {
46
  );
47
  wp_localize_script( 'swpsmtp_admin_js', 'easywpsmtp', $params );
48
  wp_enqueue_script( 'swpsmtp_admin_js' );
49
-
50
- // `Clicky by Yoast` plugin's admin-side scripts should be removed from settings page to prevent JS errors
51
- // https://wordpress.org/support/topic/plugin-causing-conflicts-on-admin-side/
52
- if ( class_exists( 'Clicky_Admin' ) ) {
53
- ob_start();
54
- add_action( 'admin_print_scripts', array( $this, 'remove_conflicting_scripts' ), 10000 );
55
- }
56
  }
57
 
58
  public function admin_menu() {
@@ -134,16 +118,16 @@ function swpsmtp_settings() {
134
  $swpsmtp_options['email_ignore_list'] = sanitize_text_field( $_POST['swpsmtp_email_ignore_list'] );
135
  }
136
 
137
- $swpsmtp_options['smtp_settings']['host'] = stripslashes( $_POST['swpsmtp_smtp_host'] );
138
  $swpsmtp_options['smtp_settings']['type_encryption'] = ( isset( $_POST['swpsmtp_smtp_type_encryption'] ) ) ? sanitize_text_field( $_POST['swpsmtp_smtp_type_encryption'] ) : 'none';
139
  $swpsmtp_options['smtp_settings']['autentication'] = ( isset( $_POST['swpsmtp_smtp_autentication'] ) ) ? sanitize_text_field( $_POST['swpsmtp_smtp_autentication'] ) : 'yes';
140
- $swpsmtp_options['smtp_settings']['username'] = stripslashes( $_POST['swpsmtp_smtp_username'] );
141
 
142
  $swpsmtp_options['smtp_settings']['enable_debug'] = isset( $_POST['swpsmtp_enable_debug'] ) ? 1 : false;
143
  $swpsmtp_options['smtp_settings']['insecure_ssl'] = isset( $_POST['swpsmtp_insecure_ssl'] ) ? 1 : false;
144
  $swpsmtp_options['smtp_settings']['encrypt_pass'] = isset( $_POST['swpsmtp_encrypt_pass'] ) ? 1 : false;
145
 
146
- $smtp_password = $_POST['swpsmtp_smtp_password'];
147
  if ( $smtp_password !== $gag_password ) {
148
  $swpsmtp_options['smtp_settings']['password'] = $easy_wp_smtp->encrypt_password( $smtp_password );
149
  }
@@ -165,7 +149,7 @@ function swpsmtp_settings() {
165
 
166
  /* Check value from "SMTP port" option */
167
  if ( isset( $_POST['swpsmtp_smtp_port'] ) ) {
168
- if ( empty( $_POST['swpsmtp_smtp_port'] ) || 1 > intval( $_POST['swpsmtp_smtp_port'] ) || ( ! preg_match( '/^\d+$/', $_POST['swpsmtp_smtp_port'] ) ) ) {
169
  $swpsmtp_options['smtp_settings']['port'] = '25';
170
  $error .= ' ' . __( "Please enter a valid port in the 'SMTP Port' field.", 'easy-wp-smtp' );
171
  } else {
7
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
8
  }
9
 
 
 
 
 
 
 
 
 
 
10
  public function admin_enqueue_scripts( $hook ) {
11
  // Load only on ?page=swpsmtp_settings
12
  if ( 'settings_page_swpsmtp_settings' !== $hook ) {
37
  );
38
  wp_localize_script( 'swpsmtp_admin_js', 'easywpsmtp', $params );
39
  wp_enqueue_script( 'swpsmtp_admin_js' );
 
 
 
 
 
 
 
40
  }
41
 
42
  public function admin_menu() {
118
  $swpsmtp_options['email_ignore_list'] = sanitize_text_field( $_POST['swpsmtp_email_ignore_list'] );
119
  }
120
 
121
+ $swpsmtp_options['smtp_settings']['host'] = sanitize_text_field( stripslashes( $_POST['swpsmtp_smtp_host'] ) );
122
  $swpsmtp_options['smtp_settings']['type_encryption'] = ( isset( $_POST['swpsmtp_smtp_type_encryption'] ) ) ? sanitize_text_field( $_POST['swpsmtp_smtp_type_encryption'] ) : 'none';
123
  $swpsmtp_options['smtp_settings']['autentication'] = ( isset( $_POST['swpsmtp_smtp_autentication'] ) ) ? sanitize_text_field( $_POST['swpsmtp_smtp_autentication'] ) : 'yes';
124
+ $swpsmtp_options['smtp_settings']['username'] = sanitize_text_field( stripslashes( $_POST['swpsmtp_smtp_username'] ) );
125
 
126
  $swpsmtp_options['smtp_settings']['enable_debug'] = isset( $_POST['swpsmtp_enable_debug'] ) ? 1 : false;
127
  $swpsmtp_options['smtp_settings']['insecure_ssl'] = isset( $_POST['swpsmtp_insecure_ssl'] ) ? 1 : false;
128
  $swpsmtp_options['smtp_settings']['encrypt_pass'] = isset( $_POST['swpsmtp_encrypt_pass'] ) ? 1 : false;
129
 
130
+ $smtp_password = sanitize_text_field( $_POST['swpsmtp_smtp_password'] );
131
  if ( $smtp_password !== $gag_password ) {
132
  $swpsmtp_options['smtp_settings']['password'] = $easy_wp_smtp->encrypt_password( $smtp_password );
133
  }
149
 
150
  /* Check value from "SMTP port" option */
151
  if ( isset( $_POST['swpsmtp_smtp_port'] ) ) {
152
+ if ( empty( $_POST['swpsmtp_smtp_port'] ) || 1 > intval( $_POST['swpsmtp_smtp_port'] ) || ( ! preg_match( '/^\d+$/', intval($_POST['swpsmtp_smtp_port'] ) ) ) ) {
153
  $swpsmtp_options['smtp_settings']['port'] = '25';
154
  $error .= ' ' . __( "Please enter a valid port in the 'SMTP Port' field.", 'easy-wp-smtp' );
155
  } else {
easy-wp-smtp.php CHANGED
@@ -3,7 +3,7 @@ use PHPMailer\PHPMailer\PHPMailer;
3
  use PHPMailer\PHPMailer\Exception;
4
  /*
5
  Plugin Name: Easy WP SMTP
6
- Version: 1.5.0
7
  Plugin URI: https://wp-ecommerce.net/easy-wordpress-smtp-send-emails-from-your-wordpress-site-using-a-smtp-server-2197
8
  Author: wpecommerce, alexanderfoxc
9
  Author URI: https://wp-ecommerce.net/
@@ -687,7 +687,7 @@ $this->log( $line . "\r\n" );
687
  echo esc_html( $err_msg );
688
  exit;
689
  }
690
- $sd_code = filter_input( INPUT_POST, 'sd_code', FILTER_SANITIZE_STRING );
691
  if ( $trans !== $sd_code ) {
692
  echo esc_html( $err_msg );
693
  exit;
3
  use PHPMailer\PHPMailer\Exception;
4
  /*
5
  Plugin Name: Easy WP SMTP
6
+ Version: 1.5.1
7
  Plugin URI: https://wp-ecommerce.net/easy-wordpress-smtp-send-emails-from-your-wordpress-site-using-a-smtp-server-2197
8
  Author: wpecommerce, alexanderfoxc
9
  Author URI: https://wp-ecommerce.net/
687
  echo esc_html( $err_msg );
688
  exit;
689
  }
690
+ $sd_code = isset( $_POST['sd_code'] ) ? sanitize_text_field( stripslashes ( $_POST['sd_code'] ) ) : '';
691
  if ( $trans !== $sd_code ) {
692
  echo esc_html( $err_msg );
693
  exit;
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: wpecommerce, wp.insider, alexanderfoxc
3
  Donate link: https://wp-ecommerce.net/easy-wordpress-smtp-send-emails-from-your-wordpress-site-using-a-smtp-server-2197
4
  Tags: mail, wordpress smtp, phpmailer, smtp, wp_mail, email, gmail, outgoing mail, privacy, security, sendmail, ssl, tls, wp-phpmailer, mail smtp, wp smtp
5
  Requires at least: 5.0
6
- Tested up to: 6.0
7
  Requires PHP: 5.6
8
- Stable tag: 1.5.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -79,6 +79,11 @@ Inspired by [WP Mail SMTP](http://wordpress.org/plugins/wp-mail-smtp/) plugin
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
82
  = 1.5.0 =
83
  * Removed the usage of serialize() / unserialize() functions. Replaced it with json_encode() and json_decode() where applicable.
84
 
3
  Donate link: https://wp-ecommerce.net/easy-wordpress-smtp-send-emails-from-your-wordpress-site-using-a-smtp-server-2197
4
  Tags: mail, wordpress smtp, phpmailer, smtp, wp_mail, email, gmail, outgoing mail, privacy, security, sendmail, ssl, tls, wp-phpmailer, mail smtp, wp smtp
5
  Requires at least: 5.0
6
+ Tested up to: 6.1
7
  Requires PHP: 5.6
8
+ Stable tag: 1.5.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
79
 
80
  == Changelog ==
81
 
82
+ = 1.5.1 =
83
+ * Removed the special Clicky plugin compatibility code as it is no longer necessary.
84
+ * Removed the use of deprecated FILTER_SANITIZE_STRING.
85
+ * Added sanitization to input fields(that were missing it).
86
+
87
  = 1.5.0 =
88
  * Removed the usage of serialize() / unserialize() functions. Replaced it with json_encode() and json_decode() where applicable.
89