VaultPress - Version 1.5.7

Version Description

  • Bugfix: Avoid PHP 5.4 warnings due to invalid constructor names.
  • Security: Add a new security hotfix.
Download this release

Release Info

Developer xknown
Plugin Icon 128x128 VaultPress
Version 1.5.7
Comparing to
See all releases

Code changes from version 1.5.6 to 1.5.7

class.vaultpress-database.php CHANGED
@@ -340,7 +340,7 @@ class VaultPress_Database {
340
  global $wpdb;
341
  if ( !file_exists( $data_file ) || !is_readable( $data_file ) || !filesize( $data_file ) )
342
  return array( 'last_error' => 'File does not exist', 'data_file' => $data_file );
343
- if ( md5_file( $data_file ) !== $md5_sum )
344
  return array( 'last_error' => 'Checksum mistmatch', 'data_file' => $data_file );
345
  if ( function_exists( 'exec' ) && ( $mysql = exec( 'which mysql' ) ) ) {
346
  $details = explode( ':', DB_HOST, 2 );
340
  global $wpdb;
341
  if ( !file_exists( $data_file ) || !is_readable( $data_file ) || !filesize( $data_file ) )
342
  return array( 'last_error' => 'File does not exist', 'data_file' => $data_file );
343
+ if ( $md5_sum && md5_file( $data_file ) !== $md5_sum )
344
  return array( 'last_error' => 'Checksum mistmatch', 'data_file' => $data_file );
345
  if ( function_exists( 'exec' ) && ( $mysql = exec( 'which mysql' ) ) ) {
346
  $details = explode( ':', DB_HOST, 2 );
class.vaultpress-hotfixes.php CHANGED
@@ -79,6 +79,43 @@ class VaultPress_Hotfixes {
79
  add_filter( 'editable_slug', 'esc_textarea' );
80
 
81
  add_filter( 'get_pagenum_link', array( $this, 'get_pagenum_link' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  }
83
 
84
  function r21138_xmlrpc_edit_posts( $caps, $cap, $user_id, $args ) {
79
  add_filter( 'editable_slug', 'esc_textarea' );
80
 
81
  add_filter( 'get_pagenum_link', array( $this, 'get_pagenum_link' ) );
82
+
83
+ add_filter( 'jetpack_xmlrpc_methods', array( $this, 'disable_jetpack_xmlrpc_methods_293' ), 20, 3 );
84
+ add_filter( 'xmlrpc_methods', array( $this, 'disable_xmlrpc_methods_293' ), 20 );
85
+ }
86
+
87
+ function disable_jetpack_xmlrpc_methods_293( $jetpack_methods, $core_methods, $user = false ) {
88
+ if ( $this->needs_jetpack_293_fix() && !$user )
89
+ unset( $jetpack_methods['jetpack.jsonAPI'], $jetpack_methods['jetpack.verifyAction'] );
90
+ return $jetpack_methods;
91
+ }
92
+
93
+ function disable_xmlrpc_methods_293( $core_methods ) {
94
+ if ( $this->needs_jetpack_293_fix() )
95
+ unset( $core_methods['jetpack.verifyAction'] );
96
+ return $core_methods;
97
+ }
98
+
99
+ function needs_jetpack_293_fix() {
100
+ if ( ! defined( 'JETPACK__VERSION' ) )
101
+ return false;
102
+ $secure_jetpacks = array(
103
+ '1.9' => '1.9.3',
104
+ '2.0' => '2.0.5',
105
+ '2.1' => '2.1.3',
106
+ '2.2' => '2.2.6',
107
+ '2.3' => '2.3.6',
108
+ '2.4' => '2.4.3',
109
+ '2.5' => '2.5.1',
110
+ '2.6' => '2.6.2',
111
+ '2.7' => '2.7.1',
112
+ '2.8' => '2.8.1',
113
+ '2.9' => '2.9.3',
114
+ );
115
+ $float_version = (string) floatval( JETPACK__VERSION );
116
+ if ( ! isset( $secure_jetpacks[ $float_version ] ) )
117
+ return false;
118
+ return version_compare( JETPACK__VERSION, $secure_jetpacks[ $float_version ], '<' );
119
  }
120
 
121
  function r21138_xmlrpc_edit_posts( $caps, $cap, $user_id, $args ) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic, apokalyptik, briancolinger, josephscott, shaunandrews,
3
  Tags: security, malware, virus, backups, scanning
4
  Requires at least: 2.9.2
5
  Tested up to: 3.8
6
- Stable tag: 1.5.6
7
  License: GPLv2
8
 
9
  VaultPress is a subscription service offering realtime backup, automated security scanning, and support from WordPress experts.
@@ -51,7 +51,11 @@ A VaultPress subscription is for a single WordPress site. You can purchase addit
51
  Yes, VaultPress supports Multisite installs. Each site will require its own subscription.
52
 
53
  == Changelog ==
 
 
 
54
  = 1.5.6 =
 
55
  * Bugfix: Some servers with restrictive security filters make database restores fail.
56
  * Feature: Add a new restore method to VaultPress_Database.
57
 
3
  Tags: security, malware, virus, backups, scanning
4
  Requires at least: 2.9.2
5
  Tested up to: 3.8
6
+ Stable tag: 1.5.7
7
  License: GPLv2
8
 
9
  VaultPress is a subscription service offering realtime backup, automated security scanning, and support from WordPress experts.
51
  Yes, VaultPress supports Multisite installs. Each site will require its own subscription.
52
 
53
  == Changelog ==
54
+ = 1.5.7 =
55
+ * Bugfix: Avoid PHP 5.4 warnings due to invalid constructor names.
56
+ * Security: Add a new security hotfix.
57
  = 1.5.6 =
58
+ * Bugfix: Avoid PHP 5.4 warnings.
59
  * Bugfix: Some servers with restrictive security filters make database restores fail.
60
  * Feature: Add a new restore method to VaultPress_Database.
61
 
vaultpress.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: VaultPress
4
  * Plugin URI: http://vaultpress.com/?utm_source=plugin-uri&amp;utm_medium=plugin-description&amp;utm_campaign=1.0
5
  * Description: Protect your content, themes, plugins, and settings with <strong>realtime backup</strong> and <strong>automated security scanning</strong> from <a href="http://vaultpress.com/?utm_source=wp-admin&amp;utm_medium=plugin-description&amp;utm_campaign=1.0" rel="nofollow">VaultPress</a>. Activate, enter your registration key, and never worry again. <a href="http://vaultpress.com/help/?utm_source=wp-admin&amp;utm_medium=plugin-description&amp;utm_campaign=1.0" rel="nofollow">Need some help?</a>
6
- * Version: 1.5.6
7
  * Author: Automattic
8
  * Author URI: http://vaultpress.com/?utm_source=author-uri&amp;utm_medium=plugin-description&amp;utm_campaign=1.0
9
  * License: GPL2+
@@ -18,7 +18,7 @@ if ( !defined( 'ABSPATH' ) )
18
  class VaultPress {
19
  var $option_name = 'vaultpress';
20
  var $db_version = 3;
21
- var $plugin_version = '1.5.6';
22
 
23
  function __construct() {
24
  register_activation_hook( __FILE__, array( $this, 'activate' ) );
@@ -1507,7 +1507,7 @@ JS;
1507
  }
1508
  break;
1509
  case 'db:restore':
1510
- if ( !empty( $_POST['path'] ) && !empty( $_POST['hash'] ) ) {
1511
  $delete = !isset( $_POST['remove'] ) || $_POST['remove'] && 'false' !== $_POST['remove'];
1512
  $this->response( $bdb->restore( $_POST['path'], $_POST['hash'], $delete ) );
1513
  }
3
  * Plugin Name: VaultPress
4
  * Plugin URI: http://vaultpress.com/?utm_source=plugin-uri&amp;utm_medium=plugin-description&amp;utm_campaign=1.0
5
  * Description: Protect your content, themes, plugins, and settings with <strong>realtime backup</strong> and <strong>automated security scanning</strong> from <a href="http://vaultpress.com/?utm_source=wp-admin&amp;utm_medium=plugin-description&amp;utm_campaign=1.0" rel="nofollow">VaultPress</a>. Activate, enter your registration key, and never worry again. <a href="http://vaultpress.com/help/?utm_source=wp-admin&amp;utm_medium=plugin-description&amp;utm_campaign=1.0" rel="nofollow">Need some help?</a>
6
+ * Version: 1.5.7
7
  * Author: Automattic
8
  * Author URI: http://vaultpress.com/?utm_source=author-uri&amp;utm_medium=plugin-description&amp;utm_campaign=1.0
9
  * License: GPL2+
18
  class VaultPress {
19
  var $option_name = 'vaultpress';
20
  var $db_version = 3;
21
+ var $plugin_version = '1.5.7';
22
 
23
  function __construct() {
24
  register_activation_hook( __FILE__, array( $this, 'activate' ) );
1507
  }
1508
  break;
1509
  case 'db:restore':
1510
+ if ( !empty( $_POST['path'] ) && isset( $_POST['hash'] ) ) {
1511
  $delete = !isset( $_POST['remove'] ) || $_POST['remove'] && 'false' !== $_POST['remove'];
1512
  $this->response( $bdb->restore( $_POST['path'], $_POST['hash'], $delete ) );
1513
  }
vp-scanner.php CHANGED
@@ -6,7 +6,7 @@ class VP_FileScan {
6
  var $offset = 0;
7
  var $ignore_symlinks = false;
8
 
9
- function VP_FileScan( $path, $ignore_symlinks = false ) {
10
  if ( is_dir( $path ) )
11
  $this->last_dir = $this->path = @realpath( $path );
12
  else
6
  var $offset = 0;
7
  var $ignore_symlinks = false;
8
 
9
+ function __construct( $path, $ignore_symlinks = false ) {
10
  if ( is_dir( $path ) )
11
  $this->last_dir = $this->path = @realpath( $path );
12
  else