BackUpWordPress - Version 0.4.5

Version Description

Download this release

Release Info

Developer wpdprx
Plugin Icon 128x128 BackUpWordPress
Version 0.4.5
Comparing to
See all releases

Code changes from version 0.4.4 to 0.4.5

backupwordpress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: BackUpWordPress
4
  Plugin URI: http://wordpress.designpraxis.at
5
  Description: Manage <a href="admin.php?page=backupwordpress/backupwordpress.php">WordPress Backups</a>. Beta Release. Please help testing and give me feedback under the comments section of <a href="http://wordpress.designpraxis.at/plugins/backupwordpress/">the Plugin page</a>. Backup DB, Files & Folders, use .tar.gz, .zip, Exclude List, etc.
6
  Author: Roland Rust
7
- Version: 0.4.4
8
  Author URI: http://wordpress.designpraxis.at
9
  */
10
 
@@ -25,7 +25,7 @@ Author URI: http://wordpress.designpraxis.at
25
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
  */
27
  define("BKPWP_PLUGIN_PATH", ABSPATH."wp-content/plugins/backupwordpress/");
28
- define("BKPWP_VERSION", "0.4.4");
29
 
30
  // get the functions
31
  require_once(BKPWP_PLUGIN_PATH."functions.php");
4
  Plugin URI: http://wordpress.designpraxis.at
5
  Description: Manage <a href="admin.php?page=backupwordpress/backupwordpress.php">WordPress Backups</a>. Beta Release. Please help testing and give me feedback under the comments section of <a href="http://wordpress.designpraxis.at/plugins/backupwordpress/">the Plugin page</a>. Backup DB, Files & Folders, use .tar.gz, .zip, Exclude List, etc.
6
  Author: Roland Rust
7
+ Version: 0.4.5
8
  Author URI: http://wordpress.designpraxis.at
9
  */
10
 
25
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
  */
27
  define("BKPWP_PLUGIN_PATH", ABSPATH."wp-content/plugins/backupwordpress/");
28
+ define("BKPWP_VERSION", "0.4.5");
29
 
30
  // get the functions
31
  require_once(BKPWP_PLUGIN_PATH."functions.php");
bkpwp-classes/manage_backups.php CHANGED
@@ -975,11 +975,11 @@ class BKPWP_MANAGE {
975
  }
976
 
977
  function bkpwp_get_preset($name="") {
978
- if (empty($name)) {
979
- $name = "full backup";
980
- }
981
  $user = $GLOBALS['userdata']->user_login;
982
- if(empty($user)) { $user = "admin"; }
983
  $presets = get_option("bkpwp_presets");
984
  $apresets = $presets[$user]['bkpwp_presets'];
985
  foreach($apresets as $p) {
975
  }
976
 
977
  function bkpwp_get_preset($name="") {
978
+ if (empty($name)) {
979
+ $name = "full backup";
980
+ }
981
  $user = $GLOBALS['userdata']->user_login;
982
+ if(empty($user)) { $user = get_option("bkpwp_install_user"); }
983
  $presets = get_option("bkpwp_presets");
984
  $apresets = $presets[$user]['bkpwp_presets'];
985
  foreach($apresets as $p) {
bkpwp-classes/options.php CHANGED
@@ -64,6 +64,10 @@ class BKPWP_OPTIONS {
64
  delete_option("bkpwppath");
65
  $msg = __("Path is not within your webroot. Please specify a writable directory inside ","bkpwp").bkpwp_conform_dir(ABSPATH).".";
66
  bkpwp_display_message($msg);
 
 
 
 
67
  } else {
68
  if (!is_dir($_REQUEST['bkpwppath'])) {
69
  if (!mkdir($_REQUEST['bkpwppath'],0777)) {
@@ -439,6 +443,7 @@ class BKPWP_OPTIONS {
439
  update_option('bkpwp_listmax_backups',15);
440
  update_option('bkpwp_max_backups',10);
441
  update_option("bkpwp_domain","bkpwp");
 
442
  update_option("bkpwp_domain_path","wp-content/plugins/bkpwp/locale");
443
 
444
  $user = $GLOBALS['userdata']->user_login;
64
  delete_option("bkpwppath");
65
  $msg = __("Path is not within your webroot. Please specify a writable directory inside ","bkpwp").bkpwp_conform_dir(ABSPATH).".";
66
  bkpwp_display_message($msg);
67
+ } elseif (bkpwp_conform_dir($_REQUEST['bkpwppath']) == bkpwp_conform_dir(ABSPATH)."/wp-content") {
68
+ delete_option("bkpwppath");
69
+ $msg = __("Do not use your wp-content directory for backup storage. Specify a writable directory inside ","bkpwp").bkpwp_conform_dir(ABSPATH)." that doen't need to be accessible by unauthenticated users.";
70
+ bkpwp_display_message($msg);
71
  } else {
72
  if (!is_dir($_REQUEST['bkpwppath'])) {
73
  if (!mkdir($_REQUEST['bkpwppath'],0777)) {
443
  update_option('bkpwp_listmax_backups',15);
444
  update_option('bkpwp_max_backups',10);
445
  update_option("bkpwp_domain","bkpwp");
446
+ update_option("bkpwp_install_user",$GLOBALS['userdata']->user_login);
447
  update_option("bkpwp_domain_path","wp-content/plugins/bkpwp/locale");
448
 
449
  $user = $GLOBALS['userdata']->user_login;
bkpwp-pages/bkpwp_manage_backups.php CHANGED
@@ -365,14 +365,14 @@ if (count($backup_archives) < 1) {
365
  <?php
366
  /* delete the backup (but leave the logfile for a while!) */
367
  if (!empty($_REQUEST['bkpwp_delete'])) {
368
- bkpwp_delete();
369
  }
370
  /* mail the backup to someone */
371
  if (!empty($_REQUEST['bkpwp_mail'])) {
372
  bkpwp_mail();
373
  }
374
  if (!empty($_REQUEST['bkpwp_restore'])) {
375
- bkpwp_restore();
376
  }
377
 
378
  ?>
365
  <?php
366
  /* delete the backup (but leave the logfile for a while!) */
367
  if (!empty($_REQUEST['bkpwp_delete'])) {
368
+ bkpwp_delete();
369
  }
370
  /* mail the backup to someone */
371
  if (!empty($_REQUEST['bkpwp_mail'])) {
372
  bkpwp_mail();
373
  }
374
  if (!empty($_REQUEST['bkpwp_restore'])) {
375
+ bkpwp_restore();
376
  }
377
 
378
  ?>
readme.txt CHANGED
@@ -69,6 +69,10 @@ Some pieces of code have been modified:
69
 
70
  Changelog:
71
 
 
 
 
 
72
  Changes in 0.4.4
73
  + another even more important security fix.
74
 
69
 
70
  Changelog:
71
 
72
+ Changes in 0.4.5
73
+ + fix prevents users from setting wp-content as backup repository. The directory must be one that can be secured with .htaccess.
74
+ + fixes the default admin issue reported here: http://wpforum.designpraxis.at/topic/error-invalid-argument-supplied-for-foreach-?replies=2#post-322
75
+
76
  Changes in 0.4.4
77
  + another even more important security fix.
78