Version Description
- When you are exporting data we scape every first data if it starts with a +, -, =, and @ including a \ to prevent any unwanted formula execution in a spreadsheet that will be working with the CSV
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.16.3.6 |
Comparing to | |
See all releases |
Code changes from version 1.16.3.5 to 1.16.3.6
- classes/export.php +14 -2
- import-users-from-csv-with-meta.php +1 -1
- readme.txt +4 -1
classes/export.php
CHANGED
@@ -125,6 +125,18 @@ class ACUI_Exporter{
|
|
125 |
return array_merge( array_flip( $columns ), $row );
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
public static function prepare( $key, $value, $datetime_format ){
|
129 |
$timestamp_keys = apply_filters( 'acui_export_timestamp_keys', array( 'wc_last_active' ) );
|
130 |
$non_date_keys = apply_filters( 'acui_export_non_date_keys', array() );
|
@@ -133,7 +145,7 @@ class ACUI_Exporter{
|
|
133 |
return serialize( $value );
|
134 |
}
|
135 |
elseif( in_array( $key, $non_date_keys ) || empty( $datetime_format ) ){
|
136 |
-
return $value;
|
137 |
}
|
138 |
elseif( strtotime( $value ) ){ // dates in datetime format
|
139 |
return date( $datetime_format, strtotime( $value ) );
|
@@ -142,7 +154,7 @@ class ACUI_Exporter{
|
|
142 |
return date( $datetime_format, $value );
|
143 |
}
|
144 |
else{
|
145 |
-
return $value;
|
146 |
}
|
147 |
}
|
148 |
|
125 |
return array_merge( array_flip( $columns ), $row );
|
126 |
}
|
127 |
|
128 |
+
public static function clean_bad_characters_formulas( $value ){
|
129 |
+
if( strlen( $value ) == 0 )
|
130 |
+
return $value;
|
131 |
+
|
132 |
+
$bad_characters = array( '+', '-', '=', '@' );
|
133 |
+
$first_character = substr( $value, 0, 1 );
|
134 |
+
if( in_array( $first_character, $bad_characters ) )
|
135 |
+
$value = "\\" . $first_character . substr( $value, 1 );
|
136 |
+
|
137 |
+
return $value;
|
138 |
+
}
|
139 |
+
|
140 |
public static function prepare( $key, $value, $datetime_format ){
|
141 |
$timestamp_keys = apply_filters( 'acui_export_timestamp_keys', array( 'wc_last_active' ) );
|
142 |
$non_date_keys = apply_filters( 'acui_export_non_date_keys', array() );
|
145 |
return serialize( $value );
|
146 |
}
|
147 |
elseif( in_array( $key, $non_date_keys ) || empty( $datetime_format ) ){
|
148 |
+
return self::clean_bad_characters_formulas( $value );
|
149 |
}
|
150 |
elseif( strtotime( $value ) ){ // dates in datetime format
|
151 |
return date( $datetime_format, strtotime( $value ) );
|
154 |
return date( $datetime_format, $value );
|
155 |
}
|
156 |
else{
|
157 |
+
return self::clean_bad_characters_formulas( $value );
|
158 |
}
|
159 |
}
|
160 |
|
import-users-from-csv-with-meta.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Import and export users and customers
|
4 |
Plugin URI: https://www.codection.com
|
5 |
Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins
|
6 |
-
Version: 1.16.3.
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
3 |
Plugin Name: Import and export users and customers
|
4 |
Plugin URI: https://www.codection.com
|
5 |
Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins
|
6 |
+
Version: 1.16.3.6
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://codection.com/go/donate-import-users-from-csv-with-meta/
|
|
4 |
Tags: csv, import, importer, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 5.5.3
|
7 |
-
Stable tag: 1.16.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -103,6 +103,9 @@ Plugin will automatically detect:
|
|
103 |
|
104 |
== Changelog ==
|
105 |
|
|
|
|
|
|
|
106 |
= 1.16.3.5 =
|
107 |
* New option in standard import to choose if passwords should be updated when updating users
|
108 |
|
4 |
Tags: csv, import, importer, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 5.5.3
|
7 |
+
Stable tag: 1.16.3.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= 1.16.3.6 =
|
107 |
+
* When you are exporting data we scape every first data if it starts with a +, -, =, and @ including a \ to prevent any unwanted formula execution in a spreadsheet that will be working with the CSV
|
108 |
+
|
109 |
= 1.16.3.5 =
|
110 |
* New option in standard import to choose if passwords should be updated when updating users
|
111 |
|