Version Description
Added
- Better support for database binary fields
Download this release
Release Info
Developer | bangelov |
Plugin | All-in-One WP Migration |
Version | 7.64 |
Comparing to | |
See all releases |
Code changes from version 7.63 to 7.64
- all-in-one-wp-migration.php +1 -1
- constants.php +1 -1
- functions.php +6 -6
- lib/vendor/servmask/database/class-ai1wm-database.php +25 -22
- readme.txt +6 -1
all-in-one-wp-migration.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
|
6 |
* Author: ServMask
|
7 |
* Author URI: https://servmask.com/
|
8 |
-
* Version: 7.
|
9 |
* Text Domain: all-in-one-wp-migration
|
10 |
* Domain Path: /languages
|
11 |
* Network: True
|
5 |
* Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
|
6 |
* Author: ServMask
|
7 |
* Author URI: https://servmask.com/
|
8 |
+
* Version: 7.64
|
9 |
* Text Domain: all-in-one-wp-migration
|
10 |
* Domain Path: /languages
|
11 |
* Network: True
|
constants.php
CHANGED
@@ -35,7 +35,7 @@ define( 'AI1WM_DEBUG', false );
|
|
35 |
// ==================
|
36 |
// = Plugin Version =
|
37 |
// ==================
|
38 |
-
define( 'AI1WM_VERSION', '7.
|
39 |
|
40 |
// ===============
|
41 |
// = Plugin Name =
|
35 |
// ==================
|
36 |
// = Plugin Version =
|
37 |
// ==================
|
38 |
+
define( 'AI1WM_VERSION', '7.64' );
|
39 |
|
40 |
// ===============
|
41 |
// = Plugin Name =
|
functions.php
CHANGED
@@ -40,7 +40,7 @@ function ai1wm_storage_path( $params ) {
|
|
40 |
|
41 |
// Validate storage path
|
42 |
if ( ai1wm_validate_file( $params['storage'] ) !== 0 ) {
|
43 |
-
throw new Ai1wm_Storage_Exception( __( '
|
44 |
}
|
45 |
|
46 |
// Get storage path
|
@@ -65,7 +65,7 @@ function ai1wm_backup_path( $params ) {
|
|
65 |
|
66 |
// Validate archive path
|
67 |
if ( ai1wm_validate_file( $params['archive'] ) !== 0 ) {
|
68 |
-
throw new Ai1wm_Archive_Exception( __( '
|
69 |
}
|
70 |
|
71 |
return AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . $params['archive'];
|
@@ -84,7 +84,7 @@ function ai1wm_validate_file( $file, $allowed_files = array() ) {
|
|
84 |
// Validates special characters that are illegal in filenames on certain
|
85 |
// operating systems and special characters requiring special escaping
|
86 |
// to manipulate at the command line
|
87 |
-
$invalid_chars = array( '
|
88 |
foreach ( $invalid_chars as $char ) {
|
89 |
if ( strpos( $file, $char ) !== false ) {
|
90 |
return 1;
|
@@ -107,7 +107,7 @@ function ai1wm_archive_path( $params ) {
|
|
107 |
|
108 |
// Validate archive path
|
109 |
if ( ai1wm_validate_file( $params['archive'] ) !== 0 ) {
|
110 |
-
throw new Ai1wm_Archive_Exception( __( '
|
111 |
}
|
112 |
|
113 |
// Get archive path
|
@@ -2088,10 +2088,10 @@ function ai1wm_is_decryption_password_valid( $encrypted_signature, $password ) {
|
|
2088 |
* @param int $depth
|
2089 |
* @return void
|
2090 |
*/
|
2091 |
-
function ai1wm_json_response( $data, $options = 0
|
2092 |
if ( ! headers_sent() ) {
|
2093 |
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset', 'utf-8' ) );
|
2094 |
}
|
2095 |
|
2096 |
-
echo json_encode( $data, $options
|
2097 |
}
|
40 |
|
41 |
// Validate storage path
|
42 |
if ( ai1wm_validate_file( $params['storage'] ) !== 0 ) {
|
43 |
+
throw new Ai1wm_Storage_Exception( __( 'Your storage directory name contains invalid characters. It cannot contain: < > : " | ? * \0. <a href="https://help.servmask.com/knowledgebase/invalid-storage-name/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
|
44 |
}
|
45 |
|
46 |
// Get storage path
|
65 |
|
66 |
// Validate archive path
|
67 |
if ( ai1wm_validate_file( $params['archive'] ) !== 0 ) {
|
68 |
+
throw new Ai1wm_Archive_Exception( __( 'Your archive file name contains invalid characters. It cannot contain: < > : " | ? * \0. <a href="https://help.servmask.com/knowledgebase/invalid-archive-name/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
|
69 |
}
|
70 |
|
71 |
return AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . $params['archive'];
|
84 |
// Validates special characters that are illegal in filenames on certain
|
85 |
// operating systems and special characters requiring special escaping
|
86 |
// to manipulate at the command line
|
87 |
+
$invalid_chars = array( '<', '>', ':', '"', '|', '?', '*', chr( 0 ) );
|
88 |
foreach ( $invalid_chars as $char ) {
|
89 |
if ( strpos( $file, $char ) !== false ) {
|
90 |
return 1;
|
107 |
|
108 |
// Validate archive path
|
109 |
if ( ai1wm_validate_file( $params['archive'] ) !== 0 ) {
|
110 |
+
throw new Ai1wm_Archive_Exception( __( 'Your archive file name contains invalid characters. It cannot contain: < > : " | ? * \0. <a href="https://help.servmask.com/knowledgebase/invalid-archive-name/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
|
111 |
}
|
112 |
|
113 |
// Get archive path
|
2088 |
* @param int $depth
|
2089 |
* @return void
|
2090 |
*/
|
2091 |
+
function ai1wm_json_response( $data, $options = 0 ) {
|
2092 |
if ( ! headers_sent() ) {
|
2093 |
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset', 'utf-8' ) );
|
2094 |
}
|
2095 |
|
2096 |
+
echo json_encode( $data, $options );
|
2097 |
}
|
lib/vendor/servmask/database/class-ai1wm-database.php
CHANGED
@@ -1958,29 +1958,32 @@ abstract class Ai1wm_Database {
|
|
1958 |
* @return string
|
1959 |
*/
|
1960 |
protected function prepare_table_values( $input, $column_type ) {
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
|
|
1982 |
|
1983 |
-
|
|
|
|
|
1984 |
}
|
1985 |
|
1986 |
/**
|
1958 |
* @return string
|
1959 |
*/
|
1960 |
protected function prepare_table_values( $input, $column_type ) {
|
1961 |
+
switch ( true ) {
|
1962 |
+
case is_null( $input ):
|
1963 |
+
return 'NULL';
|
1964 |
+
|
1965 |
+
case stripos( $column_type, 'tinyint' ) === 0:
|
1966 |
+
case stripos( $column_type, 'smallint' ) === 0:
|
1967 |
+
case stripos( $column_type, 'mediumint' ) === 0:
|
1968 |
+
case stripos( $column_type, 'int' ) === 0:
|
1969 |
+
case stripos( $column_type, 'bigint' ) === 0:
|
1970 |
+
case stripos( $column_type, 'float' ) === 0:
|
1971 |
+
case stripos( $column_type, 'double' ) === 0:
|
1972 |
+
case stripos( $column_type, 'decimal' ) === 0:
|
1973 |
+
case stripos( $column_type, 'bit' ) === 0:
|
1974 |
+
return $input;
|
1975 |
+
|
1976 |
+
case stripos( $column_type, 'binary' ) === 0:
|
1977 |
+
case stripos( $column_type, 'varbinary' ) === 0:
|
1978 |
+
case stripos( $column_type, 'tinyblob' ) === 0:
|
1979 |
+
case stripos( $column_type, 'mediumblob' ) === 0:
|
1980 |
+
case stripos( $column_type, 'longblob' ) === 0:
|
1981 |
+
case stripos( $column_type, 'blob' ) === 0:
|
1982 |
+
return '0x' . bin2hex( $input );
|
1983 |
|
1984 |
+
default:
|
1985 |
+
return "'" . $this->escape( $input ) . "'";
|
1986 |
+
}
|
1987 |
}
|
1988 |
|
1989 |
/**
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordp
|
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.2.17
|
7 |
-
Stable tag: 7.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
|
@@ -89,6 +89,11 @@ All-in-One WP Migration is in full compliance with General Data Protection Regul
|
|
89 |
See our [GDPR Compliant Privacy Policy here](https://www.iubenda.com/privacy-policy/946881).
|
90 |
|
91 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
92 |
= 7.63 =
|
93 |
**Fixed**
|
94 |
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.2.17
|
7 |
+
Stable tag: 7.64
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
|
89 |
See our [GDPR Compliant Privacy Policy here](https://www.iubenda.com/privacy-policy/946881).
|
90 |
|
91 |
== Changelog ==
|
92 |
+
= 7.64 =
|
93 |
+
**Added**
|
94 |
+
|
95 |
+
* Better support for database binary fields
|
96 |
+
|
97 |
= 7.63 =
|
98 |
**Fixed**
|
99 |
|