UpdraftPlus WordPress Backup Plugin - Version 1.12.25

Version Description

  • 12/Nov/2016 =

  • COMPATIBILITY: Dropbox APIv2 capability (see: https://updraftplus.com/dropbox-api-version-1-deprecation/) in 1.12.24 was not complete - this release now avoids all APIv1 use

  • TWEAK: The 'site information' advanced tool now contains information on loaded Apache modules.

Download this release

Release Info

Developer DavidAnderson
Plugin Icon 128x128 UpdraftPlus WordPress Backup Plugin
Version 1.12.25
Comparing to
See all releases

Code changes from version 1.12.24 to 1.12.25

admin.php CHANGED
@@ -1724,7 +1724,7 @@ class UpdraftPlus_Admin {
1724
  unset($backups[$timestamp][$key.$itext.'-size']);
1725
  if (empty($backups[$timestamp][$key])) unset($backups[$timestamp][$key]);
1726
  }
1727
- if (is_array($backups[$timestamp]['checksums'])) {
1728
  foreach (array_keys($backups[$timestamp]['checksums']) as $algo) {
1729
  unset($backups[$timestamp]['checksums'][$algo][$key.$index]);
1730
  }
@@ -3431,8 +3431,8 @@ class UpdraftPlus_Admin {
3431
 
3432
  $ret .= '<div class="curstage">';
3433
  $ret .= htmlspecialchars($curstage);
3434
- //we need to add this data-progress attribute in order to be able to update the progress bar in UDCentral
3435
- $ret .= '<div class="updraft_percentage" data-progress="'.(($stage>0) ? (ceil((100/6)*$stage)) : '0').'" style="height: 100%; width:'.(($stage>0) ? (ceil((100/6)*$stage)) : '0').'%"></div>';
3436
  $ret .= '</div></div>';
3437
 
3438
  $ret .= '</div>';
1724
  unset($backups[$timestamp][$key.$itext.'-size']);
1725
  if (empty($backups[$timestamp][$key])) unset($backups[$timestamp][$key]);
1726
  }
1727
+ if (isset($backups[$timestamp]['checksums']) && is_array($backups[$timestamp]['checksums'])) {
1728
  foreach (array_keys($backups[$timestamp]['checksums']) as $algo) {
1729
  unset($backups[$timestamp]['checksums'][$algo][$key.$index]);
1730
  }
3431
 
3432
  $ret .= '<div class="curstage">';
3433
  $ret .= htmlspecialchars($curstage);
3434
+ //we need to add this data-progress attribute in order to be able to update the progress bar in UDC
3435
+ $ret .= '<div class="updraft_percentage" data-info="'.esc_attr($curstage).'" data-progress="'.(($stage>0) ? (ceil((100/6)*$stage)) : '0').'" style="height: 100%; width:'.(($stage>0) ? (ceil((100/6)*$stage)) : '0').'%"></div>';
3436
  $ret .= '</div></div>';
3437
 
3438
  $ret .= '</div>';
includes/Dropbox2/API.php CHANGED
@@ -11,7 +11,7 @@
11
  class UpdraftPlus_Dropbox_API {
12
  // API Endpoints
13
  const API_URL = 'https://api.dropbox.com/1/';
14
- const API_URL_V2 = 'https://api.dropboxapi.com/2/';
15
  const CONTENT_URL = 'https://api-content.dropbox.com/1/';
16
  const CONTENT_URL_V2 = 'https://content.dropboxapi.com/2/';
17
 
@@ -77,7 +77,7 @@ class UpdraftPlus_Dropbox_API {
77
  * @return object stdClass
78
  */
79
  public function accountInfo() {
80
- $call = 'users/get_current_account';
81
  $params = array('api_v2' => true);
82
  $response = $this->fetch('POST', self::API_URL_V2, $call, $params);
83
  return $response;
@@ -88,7 +88,7 @@ class UpdraftPlus_Dropbox_API {
88
  * @return object stdClass
89
  */
90
  public function quotaInfo() {
91
- $call = 'users/get_space_usage';
92
  $params = array('api_v2' => true);
93
  $response = $this->fetch('POST', self::API_URL_V2, $call, $params);
94
  return $response;
@@ -367,7 +367,7 @@ class UpdraftPlus_Dropbox_API {
367
  * @return array
368
  */
369
  public function search($query, $path = '', $limit = 1000) {
370
- $call = 'files/search';
371
  $params = array(
372
  'path' => $this->encodePath($path),
373
  'query' => $query,
@@ -505,7 +505,7 @@ class UpdraftPlus_Dropbox_API {
505
  * @return object stdClass
506
  */
507
  public function delete($path) {
508
- $call = 'files/delete';
509
  $params = array('path' => '/' . $this->normalisePath($path), 'api_v2' => true);
510
  $response = $this->fetch('POST', self::API_URL_V2, $call, $params);
511
  return $response;
11
  class UpdraftPlus_Dropbox_API {
12
  // API Endpoints
13
  const API_URL = 'https://api.dropbox.com/1/';
14
+ const API_URL_V2 = 'https://api.dropboxapi.com/';
15
  const CONTENT_URL = 'https://api-content.dropbox.com/1/';
16
  const CONTENT_URL_V2 = 'https://content.dropboxapi.com/2/';
17
 
77
  * @return object stdClass
78
  */
79
  public function accountInfo() {
80
+ $call = '2/users/get_current_account';
81
  $params = array('api_v2' => true);
82
  $response = $this->fetch('POST', self::API_URL_V2, $call, $params);
83
  return $response;
88
  * @return object stdClass
89
  */
90
  public function quotaInfo() {
91
+ $call = '2/users/get_space_usage';
92
  $params = array('api_v2' => true);
93
  $response = $this->fetch('POST', self::API_URL_V2, $call, $params);
94
  return $response;
367
  * @return array
368
  */
369
  public function search($query, $path = '', $limit = 1000) {
370
+ $call = '2/files/search';
371
  $params = array(
372
  'path' => $this->encodePath($path),
373
  'query' => $query,
505
  * @return object stdClass
506
  */
507
  public function delete($path) {
508
+ $call = '2/files/delete';
509
  $params = array('path' => '/' . $this->normalisePath($path), 'api_v2' => true);
510
  $response = $this->fetch('POST', self::API_URL_V2, $call, $params);
511
  return $response;
includes/Dropbox2/OAuth/Consumer/ConsumerAbstract.php CHANGED
@@ -10,13 +10,15 @@
10
 
11
  abstract class Dropbox_ConsumerAbstract
12
  {
13
- // Dropbox web endpoint
14
- const WEB_URL = 'https://www.dropbox.com/1/';
15
 
16
  // OAuth flow methods
17
  const AUTHORISE_METHOD = 'oauth2/authorize';
18
- const DEAUTHORISE_METHOD = 'disable_access_token';
 
19
  const ACCESS_TOKEN_METHOD = 'oauth2/token';
 
20
  const OAUTH_UPGRADE = 'oauth2/token_from_oauth1';
21
 
22
  /**
@@ -78,6 +80,7 @@ abstract class Dropbox_ConsumerAbstract
78
  */
79
  private function upgradeOAuth()
80
  {
 
81
  $url = UpdraftPlus_Dropbox_API::API_URL . self::OAUTH_UPGRADE;
82
  $response = $this->fetch('POST', $url, '');
83
  $token = new stdClass();
@@ -176,7 +179,7 @@ abstract class Dropbox_ConsumerAbstract
176
 
177
  protected function deauthenticate()
178
  {
179
- $url = UpdraftPlus_Dropbox_API::API_URL . self::DEAUTHORISE_METHOD;
180
  $response = $this->fetch('POST', $url, '');
181
  $this->storage->delete();
182
  }
@@ -200,7 +203,7 @@ abstract class Dropbox_ConsumerAbstract
200
  $appkey = $this->storage->get('appkey');
201
  if (!empty($appkey)){
202
  // Get the signed request URL
203
- $url = UpdraftPlus_Dropbox_API::API_URL . self::ACCESS_TOKEN_METHOD;
204
  $params = array(
205
  'code' => $code,
206
  'grant_type' => 'authorization_code',
@@ -274,6 +277,7 @@ abstract class Dropbox_ConsumerAbstract
274
  {
275
  // Get the request/access token
276
  $token = $this->getToken();
 
277
  // Prepare the standard request parameters differnt for OAuth1 and OAuth2, we still need OAuth1 to make the request to the upgrade token endpoint
278
  if (isset($token->token_type)) {
279
  $params = array(
10
 
11
  abstract class Dropbox_ConsumerAbstract
12
  {
13
+ // Dropbox web endpoint. v2 API has just dropped the 1/ suffix to the below.
14
+ const WEB_URL = 'https://www.dropbox.com/';
15
 
16
  // OAuth flow methods
17
  const AUTHORISE_METHOD = 'oauth2/authorize';
18
+ // Beware - the documentation in one place says oauth2/token/revoke, but that appears to be wrong
19
+ const DEAUTHORISE_METHOD = '2/auth/token/revoke';
20
  const ACCESS_TOKEN_METHOD = 'oauth2/token';
21
+ // The next endpoint only exists with APIv1
22
  const OAUTH_UPGRADE = 'oauth2/token_from_oauth1';
23
 
24
  /**
80
  */
81
  private function upgradeOAuth()
82
  {
83
+ // N.B. This call only exists under API v1 - i.e. there is no APIv2 equivalent. Hence the APIv1 endpoint (API_URL) is used, and not the v2 (API_URL_V2)
84
  $url = UpdraftPlus_Dropbox_API::API_URL . self::OAUTH_UPGRADE;
85
  $response = $this->fetch('POST', $url, '');
86
  $token = new stdClass();
179
 
180
  protected function deauthenticate()
181
  {
182
+ $url = UpdraftPlus_Dropbox_API::API_URL_V2 . self::DEAUTHORISE_METHOD;
183
  $response = $this->fetch('POST', $url, '');
184
  $this->storage->delete();
185
  }
203
  $appkey = $this->storage->get('appkey');
204
  if (!empty($appkey)){
205
  // Get the signed request URL
206
+ $url = UpdraftPlus_Dropbox_API::API_URL_V2 . self::ACCESS_TOKEN_METHOD;
207
  $params = array(
208
  'code' => $code,
209
  'grant_type' => 'authorization_code',
277
  {
278
  // Get the request/access token
279
  $token = $this->getToken();
280
+
281
  // Prepare the standard request parameters differnt for OAuth1 and OAuth2, we still need OAuth1 to make the request to the upgrade token endpoint
282
  if (isset($token->token_type)) {
283
  $params = array(
methods/dropbox.php CHANGED
@@ -595,7 +595,7 @@ class UpdraftPlus_BackupModule_dropbox {
595
  $updraftplus->log(__('Success:','updraftplus').' '.sprintf(__('you have authenticated your %s account','updraftplus'),'Dropbox'));
596
 
597
  if (empty($accountInfo['code']) || "200" != $accountInfo['code']) {
598
- $message .= " (".__('though part of the returned information was not as expected - your mileage may vary','updraftplus').")". $accountInfo['code'];
599
  if (!empty($accountinfo_err)) $message .= "<br>".htmlspecialchars($accountinfo_err);
600
  } else {
601
  $body = $accountInfo['body'];
595
  $updraftplus->log(__('Success:','updraftplus').' '.sprintf(__('you have authenticated your %s account','updraftplus'),'Dropbox'));
596
 
597
  if (empty($accountInfo['code']) || "200" != $accountInfo['code']) {
598
+ $message .= " (".__('though part of the returned information was not as expected - your mileage may vary','updraftplus').") ". $accountInfo['code'];
599
  if (!empty($accountinfo_err)) $message .= "<br>".htmlspecialchars($accountinfo_err);
600
  } else {
601
  $body = $accountInfo['body'];
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Backup with UpdraftPlus, DavidAnderson, DNutbourne, aporter, jcb12
3
  Tags: backup, backups, restore, amazon backup, s3 backup, dropbox backup, google drive backup, rackspace cloud files, rackspace backup, dreamhost, dreamobjects backup, ftp backup, webdav backup, google cloud storage, onedrive, azure, back up, multisite, restoration, sftp backup, ftps, scp backup, migrate, duplicate, copy, mysql backup, database backup, db backups, website backup, wordpress backup, full backup, openstack backup, sicherung
4
  Requires at least: 3.2
5
  Tested up to: 4.6
6
- Stable tag: 1.12.24
7
  Author URI: https://updraftplus.com
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
@@ -127,6 +127,11 @@ The <a href="https://updraftplus.com/news/">UpdraftPlus backup blog</a> is the b
127
 
128
  N.B. Paid versions of UpdraftPlus Backup / Restore have a version number which is 1 higher in the first digit, and has an extra component on the end, but the changelog below still applies. i.e. changes listed for 1.12.24 of the free version correspond to changes made in 2.12.24.x of the paid version.
129
 
 
 
 
 
 
130
  = 1.12.24 - 08/Nov/2016 =
131
 
132
  * FIX: When importing a single site into a multisite install as a new site (experimental feature), the main multisite URL was being incorrectly adjusted
@@ -141,7 +146,7 @@ N.B. Paid versions of UpdraftPlus Backup / Restore have a version number which i
141
  * TWEAK: When importing a single site into a multsite install as a new site, remove any cron entries for backup runs on the new site
142
  * TWEAK: Fix an inconsequential off-by-one in the chunked downloading algorithm so that the behaviour is as documented
143
  * TWEAK: Improve accessibility of Labelauty components with keyboard navigation
144
- * TWEAK: Tweak the algorithm for scheduling resumptions, to improve efficient in the (once) seen corner-case of PHP usually having a predictable run-time, but with an instance of a much longer run-time
145
  * TWEAK: Slightly more logging when an S3 error condition occurs, allowing easier diagnosis
146
  * TWEAK: Add support for the new US East (Ohio) region to S3
147
  * TWEAK: OneDrive authentication can now detect a block by CloudFlare, and direct the user accordingly
@@ -333,4 +338,4 @@ We recognise and thank the following for code and/or libraries used and/or modif
333
 
334
 
335
  == Upgrade Notice ==
336
- * 1.12.24: Dropbox backend now uses APIv2. Faster database backups on some Windows servers. Various other small tweaks and fixes.
3
  Tags: backup, backups, restore, amazon backup, s3 backup, dropbox backup, google drive backup, rackspace cloud files, rackspace backup, dreamhost, dreamobjects backup, ftp backup, webdav backup, google cloud storage, onedrive, azure, back up, multisite, restoration, sftp backup, ftps, scp backup, migrate, duplicate, copy, mysql backup, database backup, db backups, website backup, wordpress backup, full backup, openstack backup, sicherung
4
  Requires at least: 3.2
5
  Tested up to: 4.6
6
+ Stable tag: 1.12.25
7
  Author URI: https://updraftplus.com
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
127
 
128
  N.B. Paid versions of UpdraftPlus Backup / Restore have a version number which is 1 higher in the first digit, and has an extra component on the end, but the changelog below still applies. i.e. changes listed for 1.12.24 of the free version correspond to changes made in 2.12.24.x of the paid version.
129
 
130
+ = 1.12.25 - 12/Nov/2016 =
131
+
132
+ * COMPATIBILITY: Dropbox APIv2 capability (see: https://updraftplus.com/dropbox-api-version-1-deprecation/) in 1.12.24 was not complete - this release now avoids all APIv1 use
133
+ * TWEAK: The 'site information' advanced tool now contains information on loaded Apache modules.
134
+
135
  = 1.12.24 - 08/Nov/2016 =
136
 
137
  * FIX: When importing a single site into a multisite install as a new site (experimental feature), the main multisite URL was being incorrectly adjusted
146
  * TWEAK: When importing a single site into a multsite install as a new site, remove any cron entries for backup runs on the new site
147
  * TWEAK: Fix an inconsequential off-by-one in the chunked downloading algorithm so that the behaviour is as documented
148
  * TWEAK: Improve accessibility of Labelauty components with keyboard navigation
149
+ * TWEAK: Tweak the algorithm for scheduling resumptions, to improve efficiency in the (once) seen corner-case of PHP usually having a predictable run-time, but with an instance of a much longer run-time
150
  * TWEAK: Slightly more logging when an S3 error condition occurs, allowing easier diagnosis
151
  * TWEAK: Add support for the new US East (Ohio) region to S3
152
  * TWEAK: OneDrive authentication can now detect a block by CloudFlare, and direct the user accordingly
338
 
339
 
340
  == Upgrade Notice ==
341
+ * 1.12.25: Dropbox backend now uses APIv2. Faster database backups on some Windows servers. Various other small tweaks and fixes.
templates/wp-admin/advanced/site-info.php CHANGED
@@ -25,8 +25,10 @@
25
  }
26
 
27
  $uname_info .= $release_name.$mtype.' '.@php_uname('v');
 
 
28
 
29
- $updraftplus_admin->settings_debugrow(__('Web server:','updraftplus'), htmlspecialchars($_SERVER["SERVER_SOFTWARE"]).' ('.htmlspecialchars($uname_info).')');
30
 
31
  $updraftplus_admin->settings_debugrow('ABSPATH:', htmlspecialchars(ABSPATH));
32
  $updraftplus_admin->settings_debugrow('WP_CONTENT_DIR:', htmlspecialchars(WP_CONTENT_DIR));
@@ -65,6 +67,23 @@
65
  $updraftplus_admin->settings_debugrow(__('Free disk space in account:', 'updraftplus'), sprintf(__('%s (%s used)', 'updraftplus'), round($hosting_bytes_free[3]/1048576, 1)." MB", "$perc %"));
66
  }
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  $updraftplus_admin->settings_debugrow(__('Plugins for debugging:', 'updraftplus'),'<a href="'.wp_nonce_url(self_admin_url('update.php?action=install-plugin&amp;updraftplus_noautobackup=1&amp;plugin=wp-crontrol'), 'install-plugin_wp-crontrol').'">WP Crontrol</a> | <a href="'.wp_nonce_url(self_admin_url('update.php?action=install-plugin&amp;updraftplus_noautobackup=1&amp;plugin=sql-executioner'), 'install-plugin_sql-executioner').'">SQL Executioner</a> | <a href="'.wp_nonce_url(self_admin_url('update.php?action=install-plugin&amp;updraftplus_noautobackup=1&amp;plugin=advanced-code-editor'), 'install-plugin_advanced-code-editor').'">Advanced Code Editor</a> '.(current_user_can('edit_plugins') ? '<a href="'.self_admin_url('plugin-editor.php?file=updraftplus/updraftplus.php').'">(edit UpdraftPlus)</a>' : '').' | <a href="'.wp_nonce_url(self_admin_url('update.php?action=install-plugin&amp;updraftplus_noautobackup=1&amp;plugin=wp-filemanager'), 'install-plugin_wp-filemanager').'">WP Filemanager</a>');
69
 
70
  $updraftplus_admin->settings_debugrow("HTTP Get: ", '<input id="updraftplus_httpget_uri" type="text" class="call-action"> <a href="#" id="updraftplus_httpget_go">'.__('Fetch', 'updraftplus').'</a> <a href="#" id="updraftplus_httpget_gocurl">'.__('Fetch', 'updraftplus').' (Curl)</a><p id="updraftplus_httpget_results"></p>');
@@ -77,4 +96,4 @@
77
 
78
  ?>
79
  </table>
80
- </div>
25
  }
26
 
27
  $uname_info .= $release_name.$mtype.' '.@php_uname('v');
28
+
29
+ $web_server = $_SERVER["SERVER_SOFTWARE"];
30
 
31
+ $updraftplus_admin->settings_debugrow(__('Web server:','updraftplus'), htmlspecialchars($web_server).' ('.htmlspecialchars($uname_info).')');
32
 
33
  $updraftplus_admin->settings_debugrow('ABSPATH:', htmlspecialchars(ABSPATH));
34
  $updraftplus_admin->settings_debugrow('WP_CONTENT_DIR:', htmlspecialchars(WP_CONTENT_DIR));
67
  $updraftplus_admin->settings_debugrow(__('Free disk space in account:', 'updraftplus'), sprintf(__('%s (%s used)', 'updraftplus'), round($hosting_bytes_free[3]/1048576, 1)." MB", "$perc %"));
68
  }
69
 
70
+ if (function_exists('apache_get_modules')) {
71
+ $apache_info = '';
72
+ $apache_modules = apache_get_modules();
73
+ if (is_array($apache_modules)) {
74
+ sort($apache_modules, SORT_STRING);
75
+ foreach ($apache_modules as $mod) {
76
+ if (0 === strpos($mod, 'mod_')) {
77
+ $apache_info .= ', '.substr($mod, 4);
78
+ } else {
79
+ $apache_info .= ', '.$mod;
80
+ }
81
+ }
82
+ }
83
+ $apache_info = substr($apache_info, 2);
84
+ $updraftplus_admin->settings_debugrow(__('Apache modules', 'updraftplus').':', $apache_info);
85
+ }
86
+
87
  $updraftplus_admin->settings_debugrow(__('Plugins for debugging:', 'updraftplus'),'<a href="'.wp_nonce_url(self_admin_url('update.php?action=install-plugin&amp;updraftplus_noautobackup=1&amp;plugin=wp-crontrol'), 'install-plugin_wp-crontrol').'">WP Crontrol</a> | <a href="'.wp_nonce_url(self_admin_url('update.php?action=install-plugin&amp;updraftplus_noautobackup=1&amp;plugin=sql-executioner'), 'install-plugin_sql-executioner').'">SQL Executioner</a> | <a href="'.wp_nonce_url(self_admin_url('update.php?action=install-plugin&amp;updraftplus_noautobackup=1&amp;plugin=advanced-code-editor'), 'install-plugin_advanced-code-editor').'">Advanced Code Editor</a> '.(current_user_can('edit_plugins') ? '<a href="'.self_admin_url('plugin-editor.php?file=updraftplus/updraftplus.php').'">(edit UpdraftPlus)</a>' : '').' | <a href="'.wp_nonce_url(self_admin_url('update.php?action=install-plugin&amp;updraftplus_noautobackup=1&amp;plugin=wp-filemanager'), 'install-plugin_wp-filemanager').'">WP Filemanager</a>');
88
 
89
  $updraftplus_admin->settings_debugrow("HTTP Get: ", '<input id="updraftplus_httpget_uri" type="text" class="call-action"> <a href="#" id="updraftplus_httpget_go">'.__('Fetch', 'updraftplus').'</a> <a href="#" id="updraftplus_httpget_gocurl">'.__('Fetch', 'updraftplus').' (Curl)</a><p id="updraftplus_httpget_results"></p>');
96
 
97
  ?>
98
  </table>
99
+ </div>
updraftplus.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: UpdraftPlus - Backup/Restore
4
  Plugin URI: https://updraftplus.com
5
  Description: Backup and restore: take backups locally, or backup to Amazon S3, Dropbox, Google Drive, Rackspace, (S)FTP, WebDAV & email, on automatic schedules.
6
  Author: UpdraftPlus.Com, DavidAnderson
7
- Version: 1.12.24
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus
4
  Plugin URI: https://updraftplus.com
5
  Description: Backup and restore: take backups locally, or backup to Amazon S3, Dropbox, Google Drive, Rackspace, (S)FTP, WebDAV & email, on automatic schedules.
6
  Author: UpdraftPlus.Com, DavidAnderson
7
+ Version: 1.12.25
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus