WP SMTP - Version 1.1.7

Version Description

  • Using a nonce to increase security.
Download this release

Release Info

Developer acalbert
Plugin Icon 128x128 WP SMTP
Version 1.1.7
Comparing to
See all releases

Code changes from version 1.1.6 to 1.1.7

Files changed (3) hide show
  1. readme.txt +6 -2
  2. wp-smtp.php +1 -1
  3. wp_smtp_admin.php +11 -2
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SKA6T
4
  Tags: wp smtp,smtp,mail,email,phpmailer,mailer,wp mail,gmail,yahoo,mail smtp,ssl,tls
5
  License: GPLv2
6
  Requires at least: 2.7
7
- Tested up to: 3.6.1
8
- Stable tag: 1.1.6
9
 
10
  WP SMTP can help us to send emails via SMTP instead of the PHP mail() function.
11
 
@@ -48,6 +48,10 @@ Related Links:
48
 
49
  == Changelog ==
50
 
 
 
 
 
51
  = 1.1.6 =
52
 
53
  * Add Yahoo! example
4
  Tags: wp smtp,smtp,mail,email,phpmailer,mailer,wp mail,gmail,yahoo,mail smtp,ssl,tls
5
  License: GPLv2
6
  Requires at least: 2.7
7
+ Tested up to: 3.8.1
8
+ Stable tag: 1.1.7
9
 
10
  WP SMTP can help us to send emails via SMTP instead of the PHP mail() function.
11
 
48
 
49
  == Changelog ==
50
 
51
+ = 1.1.7 =
52
+
53
+ * Using a nonce to increase security.
54
+
55
  = 1.1.6 =
56
 
57
  * Add Yahoo! example
wp-smtp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP SMTP
4
  Plugin URI: http://boliquan.com/wp-smtp/
5
  Description: WP SMTP can help us to send emails via SMTP instead of the PHP mail() function.
6
- Version: 1.1.6
7
  Author: BoLiQuan
8
  Author URI: http://boliquan.com/
9
  Text Domain: WP-SMTP
3
  Plugin Name: WP SMTP
4
  Plugin URI: http://boliquan.com/wp-smtp/
5
  Description: WP SMTP can help us to send emails via SMTP instead of the PHP mail() function.
6
+ Version: 1.1.7
7
  Author: BoLiQuan
8
  Author URI: http://boliquan.com/
9
  Text Domain: WP-SMTP
wp_smtp_admin.php CHANGED
@@ -4,8 +4,12 @@ function wp_smtp_admin(){
4
  }
5
 
6
  function wp_smtp_page(){
 
7
  global $wsOptions;
8
- if(isset($_POST['wp_smtp_update'])){
 
 
 
9
  $wsOptions = array();
10
  $wsOptions["from"] = trim($_POST['wp_smtp_from']);
11
  $wsOptions["fromname"] = trim($_POST['wp_smtp_fromname']);
@@ -27,7 +31,10 @@ function wp_smtp_page(){
27
  echo '<div id="message" class="updated fade"><p><strong>' . __("Options saved.","WP-SMTP") . '</strong></p></div>';
28
  }
29
  }
30
- if(isset($_POST['wp_smtp_test'])){
 
 
 
31
  $to = trim($_POST['wp_smtp_to']);
32
  $subject = trim($_POST['wp_smtp_subject']);
33
  $message = trim($_POST['wp_smtp_message']);
@@ -187,6 +194,7 @@ WP SMTP
187
 
188
  <p class="submit">
189
  <input type="hidden" name="wp_smtp_update" value="update" />
 
190
  <input type="submit" class="button-primary" name="Submit" value="<?php _e('Save Changes'); ?>" />
191
  </p>
192
 
@@ -227,6 +235,7 @@ WP SMTP
227
  </table>
228
  <p class="submit">
229
  <input type="hidden" name="wp_smtp_test" value="test" />
 
230
  <input type="submit" class="button-primary" value="<?php _e('Send Test','WP-SMTP'); ?>" />
231
  </p>
232
  </form>
4
  }
5
 
6
  function wp_smtp_page(){
7
+ $ws_nonce = wp_create_nonce('my_ws_nonce');
8
  global $wsOptions;
9
+ if(isset($_POST['wp_smtp_update']) && isset($_POST['wp_smtp_nonce_update'])){
10
+ if(!wp_verify_nonce(trim($_POST['wp_smtp_nonce_update']),'my_ws_nonce')){
11
+ wp_die('Security check not passed!');
12
+ }
13
  $wsOptions = array();
14
  $wsOptions["from"] = trim($_POST['wp_smtp_from']);
15
  $wsOptions["fromname"] = trim($_POST['wp_smtp_fromname']);
31
  echo '<div id="message" class="updated fade"><p><strong>' . __("Options saved.","WP-SMTP") . '</strong></p></div>';
32
  }
33
  }
34
+ if(isset($_POST['wp_smtp_test']) && isset($_POST['wp_smtp_nonce_test'])){
35
+ if(!wp_verify_nonce(trim($_POST['wp_smtp_nonce_test']),'my_ws_nonce')){
36
+ wp_die('Security check not passed!');
37
+ }
38
  $to = trim($_POST['wp_smtp_to']);
39
  $subject = trim($_POST['wp_smtp_subject']);
40
  $message = trim($_POST['wp_smtp_message']);
194
 
195
  <p class="submit">
196
  <input type="hidden" name="wp_smtp_update" value="update" />
197
+ <input type="hidden" name="wp_smtp_nonce_update" value="<?php echo $ws_nonce; ?>" />
198
  <input type="submit" class="button-primary" name="Submit" value="<?php _e('Save Changes'); ?>" />
199
  </p>
200
 
235
  </table>
236
  <p class="submit">
237
  <input type="hidden" name="wp_smtp_test" value="test" />
238
+ <input type="hidden" name="wp_smtp_nonce_test" value="<?php echo $ws_nonce; ?>" />
239
  <input type="submit" class="button-primary" value="<?php _e('Send Test','WP-SMTP'); ?>" />
240
  </p>
241
  </form>