Newsletter - Version 5.3.1

Version Description

  • jQuery fix
  • Email cleanup on admin edit panel
  • Name check for spam on subscription
Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 5.3.1
Comparing to
See all releases

Code changes from version 5.3.0 to 5.3.1

includes/controls.php CHANGED
@@ -1189,7 +1189,7 @@ class NewsletterControls {
1189
  }
1190
  echo '<script type="text/javascript">
1191
  jQuery(document).ready(function(){
1192
- $(".tnp-controls-color").wpColorPicker();
1193
  jQuery("textarea.dynamic").focus(function() {
1194
  jQuery("textarea.dynamic").css("height", "50px");
1195
  jQuery(this).css("height", "400px");
1189
  }
1190
  echo '<script type="text/javascript">
1191
  jQuery(document).ready(function(){
1192
+ jQuery(".tnp-controls-color").wpColorPicker();
1193
  jQuery("textarea.dynamic").focus(function() {
1194
  jQuery("textarea.dynamic").css("height", "50px");
1195
  jQuery(this).css("height", "400px");
plugin.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
- Version: 5.3.0
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -14,7 +14,7 @@
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
- define('NEWSLETTER_VERSION', '5.3.0');
18
 
19
  global $wpdb, $newsletter;
20
 
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
+ Version: 5.3.1
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
+ define('NEWSLETTER_VERSION', '5.3.1');
18
 
19
  global $wpdb, $newsletter;
20
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
3
  Requires at least: 3.4.0
4
  Tested up to: 4.9.4
5
- Stable tag: 5.3.0
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
@@ -88,6 +88,12 @@ Thank you, The Newsletter Team
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
 
91
  = 5.3.0 =
92
 
93
  * CAPTCHA system
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
3
  Requires at least: 3.4.0
4
  Tested up to: 4.9.4
5
+ Stable tag: 5.3.1
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
88
 
89
  == Changelog ==
90
 
91
+ = 5.3.1 =
92
+
93
+ * jQuery fix
94
+ * Email cleanup on admin edit panel
95
+ * Name check for spam on subscription
96
+
97
  = 5.3.0 =
98
 
99
  * CAPTCHA system
subscription/subscription.php CHANGED
@@ -141,18 +141,36 @@ class NewsletterSubscription extends NewsletterModule {
141
 
142
  $ip = $this->get_remote_ip();
143
  $email = $this->normalize_email($_REQUEST['ne']);
 
 
 
 
 
 
 
 
 
 
144
  $antibot_logger = new NewsletterLogger('antibot');
145
 
146
  if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
147
  $antibot_logger->fatal($email . ' - ' . $ip . ' - HTTP method invalid');
148
  die('Invalid');
149
  }
150
-
151
  $captcha = !empty($this->options['captcha']);
152
 
153
  if (!empty($this->options['antibot_disable']) || $this->antibot_form_check($captcha)) {
154
 
155
-
 
 
 
 
 
 
 
 
156
  // Cannot check for administrator here, too early.
157
  if (true) {
158
 
@@ -173,7 +191,8 @@ class NewsletterSubscription extends NewsletterModule {
173
  foreach ($this->options['ip_blacklist'] as $item) {
174
  if ($this->ip_match($ip, $item)) {
175
  $antibot_logger->fatal($email . ' - ' . $ip . ' - IP blacklisted');
176
- header("HTTP/1.0 404 Not Found"); die();
 
177
  }
178
  }
179
  }
@@ -184,7 +203,8 @@ class NewsletterSubscription extends NewsletterModule {
184
  foreach ($this->options['address_blacklist'] as $item) {
185
  if (strpos($rev_email, strrev($item)) === 0) {
186
  $antibot_logger->fatal($email . ' - ' . $ip . ' - Address blacklisted');
187
- header("HTTP/1.0 404 Not Found"); die();
 
188
  }
189
  }
190
  }
@@ -209,7 +229,6 @@ class NewsletterSubscription extends NewsletterModule {
209
  // die('Blocked 3');
210
  // }
211
  // }
212
-
213
  // Flood check
214
  if (!empty($this->options['antiflood'])) {
215
  $this->logger->debug('Antiflood check');
141
 
142
  $ip = $this->get_remote_ip();
143
  $email = $this->normalize_email($_REQUEST['ne']);
144
+ $first_name = '';
145
+ if (isset($_REQUEST['nn']))
146
+ $first_name = $this->normalize_name($_REQUEST['nn']);
147
+
148
+ $last_name = '';
149
+ if (isset($_REQUEST['ns']))
150
+ $last_name = $this->normalize_name($_REQUEST['ns']);
151
+
152
+ $full_name = trim($first_name . ' ' . $last_name);
153
+
154
  $antibot_logger = new NewsletterLogger('antibot');
155
 
156
  if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
157
  $antibot_logger->fatal($email . ' - ' . $ip . ' - HTTP method invalid');
158
  die('Invalid');
159
  }
160
+
161
  $captcha = !empty($this->options['captcha']);
162
 
163
  if (!empty($this->options['antibot_disable']) || $this->antibot_form_check($captcha)) {
164
 
165
+
166
+ if (stripos($full_name, 'http://') !== false || stripos($full_name, 'https://') !== false) {
167
+ $antibot_logger->fatal($email . ' - ' . $ip . ' - Name with http: ' . $full_name);
168
+ header("HTTP/1.0 404 Not Found");
169
+ die();
170
+ }
171
+
172
+
173
+
174
  // Cannot check for administrator here, too early.
175
  if (true) {
176
 
191
  foreach ($this->options['ip_blacklist'] as $item) {
192
  if ($this->ip_match($ip, $item)) {
193
  $antibot_logger->fatal($email . ' - ' . $ip . ' - IP blacklisted');
194
+ header("HTTP/1.0 404 Not Found");
195
+ die();
196
  }
197
  }
198
  }
203
  foreach ($this->options['address_blacklist'] as $item) {
204
  if (strpos($rev_email, strrev($item)) === 0) {
205
  $antibot_logger->fatal($email . ' - ' . $ip . ' - Address blacklisted');
206
+ header("HTTP/1.0 404 Not Found");
207
+ die();
208
  }
209
  }
210
  }
229
  // die('Blocked 3');
230
  // }
231
  // }
 
232
  // Flood check
233
  if (!empty($this->options['antiflood'])) {
234
  $this->logger->debug('Antiflood check');
users/edit.php CHANGED
@@ -13,7 +13,10 @@ if ($controls->is_action('save')) {
13
  $email = $module->normalize_email($controls->data['email']);
14
  if (empty($email)) {
15
  $controls->errors = __('Wrong email address', 'newsletter');
 
 
16
  }
 
17
 
18
  if (empty($controls->errors)) {
19
  $user = $module->get_user($controls->data['email']);
13
  $email = $module->normalize_email($controls->data['email']);
14
  if (empty($email)) {
15
  $controls->errors = __('Wrong email address', 'newsletter');
16
+ } else {
17
+ $controls->data['email'] = $email;
18
  }
19
+
20
 
21
  if (empty($controls->errors)) {
22
  $user = $module->get_user($controls->data['email']);