diff -r be944660c56a -r 3d72ae0968f4 wp/wp-content/plugins/wp-db-backup/wp-db-backup.php --- a/wp/wp-content/plugins/wp-db-backup/wp-db-backup.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-content/plugins/wp-db-backup/wp-db-backup.php Tue Sep 27 16:37:53 2022 +0200 @@ -1,15 +1,13 @@ Tools → Backup to get started. Author: Delicious Brains Author URI: https://deliciousbrains.com -Version: 2.4 +Version: 2.5.2 Domain Path: /languages -Copyright 2018 Austin Matzko (email : austin at pressedcode.com) - This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -53,7 +51,7 @@ var $basename; var $page_url; var $referer_check_key; - var $version = '2.4'; + var $version = '2.5.2'; function module_check() { $mod_evasive = false; @@ -149,7 +147,7 @@ add_action( 'init', array( &$this, 'perform_backup' ) ); break; case 'fragments': - add_action( 'admin_menu', array( &$this, 'fragment_menu' ) ); + add_action( 'admin_menu', array( &$this, 'admin_menu' ) ); break; } } elseif ( isset( $_GET['fragment'] ) ) { @@ -205,8 +203,22 @@ if ( isset( $_GET['fragment'] ) ) { list($table, $segment, $filename) = explode( ':', sanitize_text_field( $_GET['fragment'] ) ); - $this->validate_file( $filename ); - $this->backup_fragment( $table, $segment, $filename ); + + if ( empty( $table ) || in_array( $table, $this->get_tables() ) ) { + $this->validate_file( $filename ); + $this->backup_fragment( $table, $segment, $filename ); + } else { + $this->error( + array( + 'loc' => 'frame', + 'kind' => 'fatal', + 'msg' => __( + 'There was an error determining the table to backup. Please check the settings used for the backup and try again.', + 'wp-db-backup' + ), + ) + ); + } } die(); @@ -257,31 +269,39 @@ function build_backup_script() { global $table_prefix, $wpdb; - echo "
' . __( 'Backup Successful', 'wp-db-backup' ) . '!'; + $feedback = '
' . __( 'Backup Successful', 'wp-db-backup' ) . '!'; $file = $this->backup_file; switch ( $_POST['deliver'] ) { case 'http': @@ -1139,13 +1155,15 @@ $this->wp_secure(); if ( count( $this->errors ) ) { - $feedback .= '
' . __( 'The following errors were reported:', 'wp-db-backup' ) . '
'; + $feedback .= '' . __( 'The following errors were reported:', 'wp-db-backup' ) . '
'; $feedback .= '' . $this->error_display( 'main', false ) . '
'; $feedback .= '' . __( 'Scheduled Backup Options Saved!', 'wp-db-backup' ) . '
' . __( 'Scheduled Backup Options Saved!', 'wp-db-backup' ) . '
NOT exist, and we cannot create it.', 'wp-db-backup' ); ?>
' . $this->backup_dir . '' ); ?>
NOT writable! We cannot create the backup files.', 'wp-db-backup' ); ?>
777', 'a+w
', '' . $this->backup_dir . '
' ); ?>
NOT writable! We cannot create the backup files.', 'wp-db-backup' ); ?>
backup_dir . 'index.php' ); } ?> -- ' . gmdate( $datetime, $next_cron + ( get_option( 'gmt_offset' ) * 3600 ) ) . '' ); ?> + Next Backup: %s', 'wp-db-backup' ), '' . gmdate( $datetime, $next_cron + ( get_option( 'gmt_offset' ) * 3600 ) ) . '' ); ?>
referer_check_key );} ?> -' . __( 'Hold SHIFT
to toggle multiple checkboxes', 'wp-db-backup' ) . '
{$table}
";
}
echo '