MailPoet Newsletters (Previous) - Version 2.8.2

Version Description

  • 2018-03-14 =
  • Improved: protection against spam attacks. Thanks, Eslam Mohamed Reda!
  • Fixed: support for PHP 5.2 has been restored.
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (Previous)
Version 2.8.2
Comparing to
See all releases

Code changes from version 2.8.1.1 to 2.8.2

classes/WJ_Export.php CHANGED
@@ -173,12 +173,7 @@ class WJ_Export extends WYSIJA_object {
173
 
174
  // append content to the file
175
  foreach ( $data as $k => $row ) {
176
- $row = array_map(function($value) {
177
- $value = str_replace('"', '""', $value);
178
- return (preg_match('/,/', $value)) ?
179
- '"' . $value . '"' :
180
- $value;
181
- }, $row);
182
  $row_string = implode( $this->_fields_separator, $row );
183
  $encoded_string = iconv( $this->_base_encode, $this->_output_encode, $row_string );
184
  fwrite( $this->_file_handle, $encoded_string . ( $rows_count !== $k ? $this->_lines_separator : '' ) );
@@ -186,6 +181,13 @@ class WJ_Export extends WYSIJA_object {
186
  }
187
  }
188
 
 
 
 
 
 
 
 
189
  /**
190
  * simply prepare the header of the file based on the fields
191
  */
173
 
174
  // append content to the file
175
  foreach ( $data as $k => $row ) {
176
+ $row = array_map(array($this, '_escape_commas_and_quotes'), $row);
 
 
 
 
 
177
  $row_string = implode( $this->_fields_separator, $row );
178
  $encoded_string = iconv( $this->_base_encode, $this->_output_encode, $row_string );
179
  fwrite( $this->_file_handle, $encoded_string . ( $rows_count !== $k ? $this->_lines_separator : '' ) );
181
  }
182
  }
183
 
184
+ function _escape_commas_and_quotes($value) {
185
+ $value = str_replace('"', '""', $value);
186
+ return (preg_match('/,/', $value)) ?
187
+ '"' . $value . '"' :
188
+ $value;
189
+ }
190
+
191
  /**
192
  * simply prepare the header of the file based on the fields
193
  */
controllers/front/confirm.php CHANGED
@@ -162,6 +162,13 @@ class WYSIJA_control_front_confirm extends WYSIJA_control_front{
162
  // we need to call the translation otherwise it will not be loaded and translated
163
  $model_config->add_translated_default();
164
  $this->helperUser->uid=$userid;
 
 
 
 
 
 
 
165
  //if the status changed we might need to send notifications */
166
  if((int)$_REQUEST['wysija']['user']['status'] !=(int)$this->userData['details']['status']){
167
  if($_REQUEST['wysija']['user']['status']>0){
162
  // we need to call the translation otherwise it will not be loaded and translated
163
  $model_config->add_translated_default();
164
  $this->helperUser->uid=$userid;
165
+
166
+ // Prevent changing email address
167
+ if($this->userData['details']['email'] != $_REQUEST['wysija']['user']['email']) {
168
+ $this->error(__('Email cannot be changed. Please subscribe again.',WYSIJA),1);
169
+ unset($_REQUEST['wysija']['user']['email']);
170
+ }
171
+
172
  //if the status changed we might need to send notifications */
173
  if((int)$_REQUEST['wysija']['user']['status'] !=(int)$this->userData['details']['status']){
174
  if($_REQUEST['wysija']['user']['status']>0){
core/base.php CHANGED
@@ -19,7 +19,7 @@ class WYSIJA_object{
19
  * Static variable holding core MailPoet's version
20
  * @var array
21
  */
22
- static $version = '2.8.1';
23
 
24
  function __construct(){}
25
 
19
  * Static variable holding core MailPoet's version
20
  * @var array
21
  */
22
+ static $version = '2.8.2';
23
 
24
  function __construct(){}
25
 
helpers/conflicts.php CHANGED
@@ -107,11 +107,14 @@ class WYSIJA_help_conflicts extends WYSIJA_object{
107
 
108
  function resolveScriptConflicts() {
109
  // WP 4.9 mediaelement script conflicts with the MP2 editor
110
- $dequeue_scripts = function () {
111
- wp_deregister_script('mediaelement');
112
- };
113
  add_action('wp_print_scripts', $dequeue_scripts, PHP_INT_MAX);
114
  add_action('admin_print_footer_scripts', $dequeue_scripts, PHP_INT_MAX);
115
  add_action('admin_footer', $dequeue_scripts, PHP_INT_MAX);
116
  }
117
- }
 
 
 
 
 
107
 
108
  function resolveScriptConflicts() {
109
  // WP 4.9 mediaelement script conflicts with the MP2 editor
110
+ $dequeue_scripts = array($this, '_deregisterMediaElementScript');
 
 
111
  add_action('wp_print_scripts', $dequeue_scripts, PHP_INT_MAX);
112
  add_action('admin_print_footer_scripts', $dequeue_scripts, PHP_INT_MAX);
113
  add_action('admin_footer', $dequeue_scripts, PHP_INT_MAX);
114
  }
115
+
116
+ function _deregisterMediaElementScript() {
117
+ wp_deregister_script('mediaelement');
118
+ }
119
+
120
+ }
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MailPoet 2
4
  Plugin URI: http://www.mailpoet.com/
5
  Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
6
- Version: 2.8.1
7
  Author: MailPoet
8
  Author URI: http://www.mailpoet.com/
9
  License: GPLv2 or later
3
  Plugin Name: MailPoet 2
4
  Plugin URI: http://www.mailpoet.com/
5
  Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
6
+ Version: 2.8.2
7
  Author: MailPoet
8
  Author URI: http://www.mailpoet.com/
9
  License: GPLv2 or later
languages/wysija-newsletters-de_DE.mo CHANGED
Binary file
languages/wysija-newsletters-fr_CA.mo CHANGED
Binary file
languages/wysija-newsletters-fr_FR.mo CHANGED
Binary file
languages/wysija-newsletters-hu_HU.mo CHANGED
Binary file
languages/wysija-newsletters-pt_PT.mo CHANGED
Binary file
languages/wysija-newsletters-sq.mo CHANGED
Binary file
languages/wysija-newsletters-zh_TW.mo CHANGED
Binary file
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wysija
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
4
  Requires at least: 3.5
5
  Tested up to: 4.9
6
- Stable tag: 2.8.1.1
7
  Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
8
 
9
  == Description ==
@@ -113,6 +113,10 @@ Our [support site](https://www.mailpoet.com/support) has plenty of articles and
113
 
114
  == Changelog ==
115
 
 
 
 
 
116
  = 2.8.1 - 2017-11-28 =
117
  * Added poll and discounts
118
  * Fixed editor sidebar missing if plugins enqueue the mediaelement script on WP 4.9
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
4
  Requires at least: 3.5
5
  Tested up to: 4.9
6
+ Stable tag: 2.8.2
7
  Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
8
 
9
  == Description ==
113
 
114
  == Changelog ==
115
 
116
+ = 2.8.2 - 2018-03-14 =
117
+ * Improved: protection against spam attacks. Thanks, Eslam Mohamed Reda!
118
+ * Fixed: support for PHP 5.2 has been restored.
119
+
120
  = 2.8.1 - 2017-11-28 =
121
  * Added poll and discounts
122
  * Fixed editor sidebar missing if plugins enqueue the mediaelement script on WP 4.9
views/back/campaigns.php CHANGED
@@ -1259,7 +1259,7 @@ class WYSIJA_view_back_campaigns extends WYSIJA_view_back {
1259
  <!-- THEMES BAR -->
1260
  <?php if (WYSIJA::current_user_can('wysija_theme_tab')): ?>
1261
  <div class="wj_themes" style="display:none;">
1262
- <div class="wj_button">
1263
  <a id="wysija-themes-browse" class="button" href="javascript:;" href2="admin.php?page=wysija_campaigns&action=themes"><?php _e('Add more themes', WYSIJA) ?></a>
1264
  </div>
1265
  <ul id="wj_themes_list" class="clearfix">
1259
  <!-- THEMES BAR -->
1260
  <?php if (WYSIJA::current_user_can('wysija_theme_tab')): ?>
1261
  <div class="wj_themes" style="display:none;">
1262
+ <div class="wj_button" style="display:none;">
1263
  <a id="wysija-themes-browse" class="button" href="javascript:;" href2="admin.php?page=wysija_campaigns&action=themes"><?php _e('Add more themes', WYSIJA) ?></a>
1264
  </div>
1265
  <ul id="wj_themes_list" class="clearfix">