Email Log - Version 2.2.2

Version Description

Improved the way nonce checks are done. No visible changes from functionality perspective.

Download this release

Release Info

Developer sudar
Plugin Icon 128x128 Email Log
Version 2.2.2
Comparing to
See all releases

Code changes from version 2.2.1 to 2.2.2

email-log.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Logs every email sent through WordPress
6
  * Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  * Author: Sudar
8
- * Version: 2.2.1
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
5
  * Description: Logs every email sent through WordPress
6
  * Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  * Author: Sudar
8
+ * Version: 2.2.2
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
include/Core/EmailLog.php CHANGED
@@ -17,7 +17,7 @@ class EmailLog {
17
  *
18
  * @var string
19
  */
20
- const VERSION = '2.2.1';
21
 
22
  /**
23
  * Email Log Store URL.
17
  *
18
  * @var string
19
  */
20
+ const VERSION = '2.2.2';
21
 
22
  /**
23
  * Email Log Store URL.
include/Core/Request/LogListAction.php CHANGED
@@ -84,7 +84,7 @@ class LogListAction implements Loadie {
84
  </div>
85
 
86
  <div id="tabs-preview">
87
- <?php echo $log_item['message']; ?>
88
  </div>
89
  </div>
90
 
84
  </div>
85
 
86
  <div id="tabs-preview">
87
+ <?php echo wp_kses_post( $log_item['message'] ); ?>
88
  </div>
89
  </div>
90
 
include/Core/Request/NonceChecker.php CHANGED
@@ -46,11 +46,15 @@ class NonceChecker implements Loadie {
46
  if ( isset( $_REQUEST['action'] ) ) {
47
  $action = sanitize_text_field( $_REQUEST['action'] );
48
 
49
- if ( 'el-log-list-delete' !== substr( $action, 0, 18 ) ) {
50
  return;
51
  }
52
 
53
- if ( ! wp_verify_nonce( $_REQUEST[ LogListPage::DELETE_LOG_NONCE_FIELD ], LogListPage::DELETE_LOG_ACTION ) ) {
 
 
 
 
54
  return;
55
  }
56
  }
46
  if ( isset( $_REQUEST['action'] ) ) {
47
  $action = sanitize_text_field( $_REQUEST['action'] );
48
 
49
+ if ( 'el-log-list-' !== substr( $action, 0, 12 ) ) {
50
  return;
51
  }
52
 
53
+ if ( ! isset( $_REQUEST[ LogListPage::LOG_LIST_ACTION_NONCE_FIELD ] ) ) {
54
+ return;
55
+ }
56
+
57
+ if ( ! wp_verify_nonce( $_REQUEST[ LogListPage::LOG_LIST_ACTION_NONCE_FIELD ], LogListPage::LOG_LIST_ACTION_NONCE ) ) {
58
  return;
59
  }
60
  }
include/Core/UI/Page/LogListPage.php CHANGED
@@ -20,14 +20,14 @@ class LogListPage extends BasePage {
20
  const PAGE_SLUG = 'email-log';
21
 
22
  /**
23
- * Delete Log Nonce Field.
24
  */
25
- const DELETE_LOG_NONCE_FIELD = 'el-delete-email-log-nonce';
26
 
27
  /**
28
- * Delete Log Action.
29
  */
30
- const DELETE_LOG_ACTION = 'el-delete-email-log';
31
 
32
  /**
33
  * Capability to manage email logs.
@@ -108,7 +108,7 @@ class LogListPage extends BasePage {
108
  <form id="email-logs-filter" method="get">
109
  <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>"/>
110
  <?php
111
- wp_nonce_field( self::DELETE_LOG_ACTION, self::DELETE_LOG_NONCE_FIELD );
112
  $this->log_list_table->display();
113
  ?>
114
  </form>
@@ -154,23 +154,6 @@ class LogListPage extends BasePage {
154
  return $per_page;
155
  }
156
 
157
- /**
158
- * Verify nonce for all bulk actions.
159
- */
160
- public function check_nonce() {
161
- if ( ! isset( $_REQUEST[ self::DELETE_LOG_NONCE_FIELD ] ) ) {
162
- return false;
163
- }
164
-
165
- $nonce = $_REQUEST[ self::DELETE_LOG_NONCE_FIELD ];
166
-
167
- if ( ! wp_verify_nonce( $nonce, self::DELETE_LOG_ACTION ) ) {
168
- wp_die( 'Cheating, Huh? ' );
169
- }
170
-
171
- return true;
172
- }
173
-
174
  /**
175
  * Get nonce args.
176
  *
@@ -178,7 +161,7 @@ class LogListPage extends BasePage {
178
  */
179
  public function get_nonce_args() {
180
  return array(
181
- self::DELETE_LOG_NONCE_FIELD => wp_create_nonce( self::DELETE_LOG_ACTION ),
182
  );
183
  }
184
 
20
  const PAGE_SLUG = 'email-log';
21
 
22
  /**
23
+ * Nonce Field.
24
  */
25
+ const LOG_LIST_ACTION_NONCE_FIELD = 'el-log-list-nonce-field';
26
 
27
  /**
28
+ * Nonce name.
29
  */
30
+ const LOG_LIST_ACTION_NONCE = 'el-log-list-nonce';
31
 
32
  /**
33
  * Capability to manage email logs.
108
  <form id="email-logs-filter" method="get">
109
  <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>"/>
110
  <?php
111
+ wp_nonce_field( self::LOG_LIST_ACTION_NONCE, self::LOG_LIST_ACTION_NONCE_FIELD );
112
  $this->log_list_table->display();
113
  ?>
114
  </form>
154
  return $per_page;
155
  }
156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  /**
158
  * Get nonce args.
159
  *
161
  */
162
  public function get_nonce_args() {
163
  return array(
164
+ self::LOG_LIST_ACTION_NONCE_FIELD => wp_create_nonce( self::LOG_LIST_ACTION_NONCE ),
165
  );
166
  }
167
 
languages/email-log.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Email Log package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Email Log 2.2.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
- "POT-Creation-Date: 2017-11-04 02:23:00+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -426,7 +426,7 @@ msgstr ""
426
  msgid "Support"
427
  msgstr ""
428
 
429
- #. #-#-#-#-# email-log.pot (Email Log 2.2.1) #-#-#-#-#
430
  #. Plugin Name of the plugin/theme
431
  #: dist/include/Core/UI/Page/LogListPage.php:57
432
  #: dist/include/Core/UI/Page/LogListPage.php:58
2
  # This file is distributed under the same license as the Email Log package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Email Log 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
+ "POT-Creation-Date: 2017-11-07 16:52:44+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
426
  msgid "Support"
427
  msgstr ""
428
 
429
+ #. #-#-#-#-# email-log.pot (Email Log 2.2.2) #-#-#-#-#
430
  #. Plugin Name of the plugin/theme
431
  #: dist/include/Core/UI/Page/LogListPage.php:57
432
  #: dist/include/Core/UI/Page/LogListPage.php:58
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: email, log, log email, resend email, multisite
4
  Requires PHP: 5.3
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
- Stable tag: 2.2.1
8
 
9
  Log and view all outgoing emails from WordPress. Works with WordPress Multisite as well.
10
 
@@ -120,6 +120,10 @@ Meanwhile, I have added a hack to handle this condition in v1.7.3 of my plugin.
120
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
121
  == Changelog ==
122
 
 
 
 
 
123
  = v2.2.1 - (2017-11-04) =
124
  - Tweak: Improved the UX of the view email content screen.
125
 
@@ -282,6 +286,9 @@ This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/
282
 
283
  == Upgrade Notice ==
284
 
 
 
 
285
  = 2.2.1 =
286
  Improved the UX of the view email content screen.
287
 
4
  Requires PHP: 5.3
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
+ Stable tag: 2.2.2
8
 
9
  Log and view all outgoing emails from WordPress. Works with WordPress Multisite as well.
10
 
120
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
121
  == Changelog ==
122
 
123
+ = v2.2.2 - (2017-11-07) =
124
+ - Tweak: Improved the way nonce checks are performed.
125
+ - Fix: Escaped the email content before showing it in preview.
126
+
127
  = v2.2.1 - (2017-11-04) =
128
  - Tweak: Improved the UX of the view email content screen.
129
 
286
 
287
  == Upgrade Notice ==
288
 
289
+ = 2.2.2 =
290
+ Improved the way nonce checks are done. No visible changes from functionality perspective.
291
+
292
  = 2.2.1 =
293
  Improved the UX of the view email content screen.
294