Skip to content
Permalink
Browse files Browse the repository at this point in the history
v3.5.4 released
  • Loading branch information
Jedi knight authored and jedi0_000 committed Jan 4, 2018
1 parent 1749100 commit 8ab8b91
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
22 changes: 11 additions & 11 deletions simple-download-monitor/main.php
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Simple Download Monitor
* Plugin URI: https://www.tipsandtricks-hq.com/simple-wordpress-download-monitor-plugin
* Description: Easily manage downloadable files and monitor downloads of your digital files from your WordPress site.
* Version: 3.5.3
* Version: 3.5.4
* Author: Tips and Tricks HQ, Ruhul Amin, Josh Lobe
* Author URI: https://www.tipsandtricks-hq.com/development-center
* License: GPL2
Expand All @@ -15,7 +15,7 @@
exit;
}

define('WP_SIMPLE_DL_MONITOR_VERSION', '3.5.3');
define('WP_SIMPLE_DL_MONITOR_VERSION', '3.5.4');
define('WP_SIMPLE_DL_MONITOR_DIR_NAME', dirname(plugin_basename(__FILE__)));
define('WP_SIMPLE_DL_MONITOR_URL', plugins_url('', __FILE__));
define('WP_SIMPLE_DL_MONITOR_PATH', plugin_dir_path(__FILE__));
Expand Down Expand Up @@ -313,7 +313,7 @@ public function display_sdm_upload_meta_box($post) { // File Upload metabox
echo '<br /><br />';

echo '<div class="sdm-download-edit-file-url-section">';
echo '<input id="sdm_upload" type="text" size="100" name="sdm_upload" value="' . $old_value . '" placeholder="http://..." />';
echo '<input id="sdm_upload" type="text" size="100" name="sdm_upload" value="' . esc_url($old_value) . '" placeholder="http://..." />';
echo '</div>';

echo '<br />';
Expand Down Expand Up @@ -356,7 +356,7 @@ public function display_sdm_thumbnail_meta_box($post) { // Thumbnail upload met
_e('Manually enter a valid URL, or click "Select Image" to upload (or choose) the file thumbnail image.', 'simple-download-monitor');
?>
<br /><br />
<input id="sdm_upload_thumbnail" type="text" size="100" name="sdm_upload_thumbnail" value="<?php echo $old_value; ?>" placeholder="http://..." />
<input id="sdm_upload_thumbnail" type="text" size="100" name="sdm_upload_thumbnail" value="<?php echo esc_url($old_value); ?>" placeholder="http://..." />
<br /><br />
<input id="upload_thumbnail_button" type="button" class="button-primary" value="<?php _e('Select Image', 'simple-download-monitor'); ?>" />
<input id="remove_thumbnail_button" type="button" class="button" value="<?php _e('Remove Image', 'simple-download-monitor'); ?>" />
Expand Down Expand Up @@ -401,7 +401,7 @@ public function display_sdm_stats_meta_box($post) { //Stats metabox
echo '<div class="sdm-download-edit-offset-count">';
_e('Offset Count: ', 'simple-download-monitor');
echo '<br />';
echo ' <input type="text" size="10" name="sdm_count_offset" value="' . $value . '" />';
echo ' <input type="text" size="10" name="sdm_count_offset" value="' . esc_attr($value) . '" />';
echo '<p class="description">' . __('Enter any positive or negative numerical value; to offset the download count shown to the visitors (when using the download counter shortcode).', 'simple-download-monitor') . '</p>';
echo '</div>';

Expand All @@ -425,14 +425,14 @@ public function display_sdm_other_details_meta_box($post) { //Other details meta
echo '<div class="sdm-download-edit-filesize">';
_e('File Size: ', 'simple-download-monitor');
echo '<br />';
echo ' <input type="text" name="sdm_item_file_size" value="' . $file_size . '" size="20" />';
echo ' <input type="text" name="sdm_item_file_size" value="' . esc_attr($file_size) . '" size="20" />';
echo '<p class="description">' . __('Enter the size of this file (example value: 2.15 MB). You can show this value in the fancy display by using a shortcode parameter.', 'simple-download-monitor') . '</p>';
echo '</div>';

echo '<div class="sdm-download-edit-version">';
_e('Version: ', 'simple-download-monitor');
echo '<br />';
echo ' <input type="text" name="sdm_item_version" value="' . $version . '" size="20" />';
echo ' <input type="text" name="sdm_item_version" value="' . esc_attr($version) . '" size="20" />';
echo '<p class="description">' . __('Enter the version number for this item if any (example value: v2.5.10). You can show this value in the fancy display by using a shortcode parameter.', 'simple-download-monitor') . '</p>';
echo '</div>';

Expand Down Expand Up @@ -473,7 +473,7 @@ public function sdm_save_upload_meta_data($post_id) { // Save File Upload metab
return;

if (isset($_POST['sdm_upload'])) {
update_post_meta($post_id, 'sdm_upload', $_POST['sdm_upload']);
update_post_meta($post_id, 'sdm_upload', sanitize_text_field($_POST['sdm_upload']));
}
}

Expand All @@ -496,7 +496,7 @@ public function sdm_save_thumbnail_meta_data($post_id) { // Save Thumbnail Uplo
return;

if (isset($_POST['sdm_upload_thumbnail'])) {
update_post_meta($post_id, 'sdm_upload_thumbnail', $_POST['sdm_upload_thumbnail']);
update_post_meta($post_id, 'sdm_upload_thumbnail', sanitize_text_field($_POST['sdm_upload_thumbnail']));
}
}

Expand Down Expand Up @@ -528,11 +528,11 @@ public function sdm_save_other_details_meta_data($post_id) { // Save Statistics
}

if (isset($_POST['sdm_item_file_size'])) {
update_post_meta($post_id, 'sdm_item_file_size', $_POST['sdm_item_file_size']);
update_post_meta($post_id, 'sdm_item_file_size', sanitize_text_field($_POST['sdm_item_file_size']));
}

if (isset($_POST['sdm_item_version'])) {
update_post_meta($post_id, 'sdm_item_version', $_POST['sdm_item_version']);
update_post_meta($post_id, 'sdm_item_version', sanitize_text_field($_POST['sdm_item_version']));
}
}

Expand Down
5 changes: 4 additions & 1 deletion simple-download-monitor/readme.txt
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.tipsandtricks-hq.com
Tags: download, downloads, count, counter, tracker, tracking, hits, logging, monitor, manager, files, media, digital, download monitor, download manager, downloadmanager, file manager, protect downloads, password, download category, file tree, ajax, download template, grid, documents, ip address
Requires at least: 4.1.0
Tested up to: 4.9
Stable tag: 3.5.3
Stable tag: 3.5.4
License: GPLv2 or later

Easily manage downloadable files and monitor downloads of your digital files from your WordPress site.
Expand Down Expand Up @@ -174,6 +174,9 @@ For screenshots please visit the [download monitor plugin page](https://www.tips

== Changelog ==

= 3.5.4 =
- Fixed stored-XSS bug. Thanks to d4wner.

= 3.5.3 =
- Added "Text Domain" and "Domain Path" to the File Header.

Expand Down

0 comments on commit 8ab8b91

Please sign in to comment.