| @@ -8,11 +8,11 @@ | ||
| 8 | 8 | if (!defined('ABSPATH')) { |
| 9 | 9 | exit; |
| 10 | 10 | } // Exit if accessed directly |
| 11 | 11 | $wpdbbkp_bg_notify = get_option('wpdbbkp_dashboard_notify',false); |
| 12 | -if (true === isset($_GET['notification']) && true === isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], 'wp-database-backup') || $wpdbbkp_bg_notify) { ?> | |
| 12 | +if (true === isset($_GET['notification']) && true === isset($_GET['_wpnonce']) && wp_verify_nonce( wp_unslash( $_GET['_wpnonce']) , 'wp-database-backup') || $wpdbbkp_bg_notify) { //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- using as nonce ?> | |
| 13 | 13 | |
| 14 | - <div class="text-center wpdbbkp_notification"><img width="50" height="50" src="<?php echo esc_url(WPDB_PLUGIN_URL. "/assets/images/success.png"); ?>"> | |
| 14 | + <div class="text-center wpdbbkp_notification"><img width="50" height="50" src="<?php echo esc_url(WPDB_PLUGIN_URL. "/assets/images/success.png"); /* phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage */ ?>"> | |
| 15 | 15 | <h4 class="text-success"><?php if ((isset($_GET['notification']) && 'create' === $_GET['notification']) || $wpdbbkp_bg_notify=='create') { |
| 16 | 16 | $backup_list = get_option('wp_db_backup_backups'); |
| 17 | 17 | if(!empty($backup_list) && is_array($backup_list)){ |
| 18 | 18 | $download_backup = end($backup_list); |
| @@ -17,9 +17,9 @@ | ||
| 17 | 17 | if(!empty($backup_list) && is_array($backup_list)){ |
| 18 | 18 | $download_backup = end($backup_list); |
| 19 | 19 | if($download_backup && !empty($download_backup) && isset($download_backup['url'])) |
| 20 | 20 | { |
| 21 | - $backup_link = '<a href="' . esc_url($download_backup['url']) . '" style="color: #21759B;">' . __('Click Here to Download Backup.', 'wpdbbkp') . '</a>'; | |
| 21 | + $backup_link = '<a href="' . esc_url(admin_url('?wpdbbkp_download='.basename($download_backup['url']))) . '" style="color: #21759B;">' . __('Click Here to Download Backup.', 'wpdbbkp') . '</a>'; | |
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | update_option('wpdbbkp_dashboard_notify',false); |
| @@ -48,9 +48,9 @@ | ||
| 48 | 48 | </div> |
| 49 | 49 | <?php } ?> |
| 50 | 50 | |
| 51 | 51 | <div id="wpdb-backup-process" style="display:none"> |
| 52 | - <div class="text-center"><img width="50" height="50" src="<?php echo esc_url(WPDB_PLUGIN_URL . "/assets/images/icon_loading.gif"); ?>"> | |
| 52 | + <div class="text-center"><img width="50" height="50" src="<?php echo esc_url(WPDB_PLUGIN_URL . "/assets/images/icon_loading.gif"); /* phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage */ ?>"> | |
| 53 | 53 | <h5 class="text-success"><strong><?php echo esc_html__('Backup process is working in background, it may take some time depending on size of your |
| 54 | 54 | website. You can close this tab if you want', 'wpdbbkp') ?></strong></h5> |
| 55 | 55 | <div class="progress"> |
| 56 | 56 | <div id="wpdbbkp_progressbar" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" |
| @@ -62,10 +62,10 @@ | ||
| 62 | 62 | </div> |
| 63 | 63 | </div> |
| 64 | 64 | |
| 65 | 65 | <div id="backup_process" style="display:none"> |
| 66 | - <div class="text-center"><img width="50" height="50" src="<?php echo esc_url(WPDB_PLUGIN_URL . "/assets/images/icon_loading.gif"); ?>"> | |
| 66 | + <div class="text-center"><img width="50" height="50" src="<?php echo esc_url(WPDB_PLUGIN_URL . "/assets/images/icon_loading.gif"); /* phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage */ ?>"> | |
| 67 | 67 | <h4 class="text-success" id="wpdbbkup_process_stats"><?php echo esc_html__('Creating Database Backup...', 'wpdbbkp') ?></h4> |
| 68 | 68 | <h5 class="text-success"><strong><?php echo esc_html__('It may take some time depending on size of your |
| 69 | 69 | Database. Do not close this window.', 'wpdbbkp') ?></strong></h5> |
| 70 | 70 | </div> |
| 71 | 71 | </div> |