Version Description
- 25.11.2022 = Fix: Readlink error ( #1142 )
Download this release
Release Info
| Developer | raldea89 |
| Plugin | |
| Version | 4.7.53 |
| Comparing to | |
| See all releases | |
Code changes from version 4.7.52 to 4.7.53
- changelog.txt +3 -0
- download-monitor.php +2 -2
- readme.txt +4 -1
- src/DownloadHandler.php +2 -2
changelog.txt
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
= 4.7.52 - 23.11.2022 =
|
| 2 |
Fix: Security fix
|
| 3 |
|
| 1 |
+
= 4.7.53 - 25.11.2022 =
|
| 2 |
+
Fix: Readlink error ( [#1142](https://github.com/WPChill/download-monitor/issues/1142) )
|
| 3 |
+
|
| 4 |
= 4.7.52 - 23.11.2022 =
|
| 5 |
Fix: Security fix
|
| 6 |
|
download-monitor.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Download Monitor
|
| 4 |
Plugin URI: https://www.download-monitor.com
|
| 5 |
Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
|
| 6 |
-
Version: 4.7.
|
| 7 |
Author: WPChill
|
| 8 |
Author URI: https://wpchill.com
|
| 9 |
Requires at least: 5.4
|
|
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 34 |
|
| 35 |
// Define DLM Version
|
| 36 |
|
| 37 |
-
define( 'DLM_VERSION', '4.7.
|
| 38 |
define( 'DLM_UPGRADER_VERSION', '4.6.0' );
|
| 39 |
|
| 40 |
// Define DLM FILE
|
| 3 |
Plugin Name: Download Monitor
|
| 4 |
Plugin URI: https://www.download-monitor.com
|
| 5 |
Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
|
| 6 |
+
Version: 4.7.53
|
| 7 |
Author: WPChill
|
| 8 |
Author URI: https://wpchill.com
|
| 9 |
Requires at least: 5.4
|
| 34 |
|
| 35 |
// Define DLM Version
|
| 36 |
|
| 37 |
+
define( 'DLM_VERSION', '4.7.53' );
|
| 38 |
define( 'DLM_UPGRADER_VERSION', '4.6.0' );
|
| 39 |
|
| 40 |
// Define DLM FILE
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: wpchill, silkalns, barrykooij, mikejolley
|
|
| 3 |
Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
|
| 4 |
Requires at least: 5.4
|
| 5 |
Tested up to: 6.1
|
| 6 |
-
Stable tag: 4.7.
|
| 7 |
License: GPLv3
|
| 8 |
Text Domain: -
|
| 9 |
Requires PHP: 5.6
|
|
@@ -121,6 +121,9 @@ More documentation can be found in our [Knowledge Base](https://www.download-mon
|
|
| 121 |
|
| 122 |
== Changelog ==
|
| 123 |
|
|
|
|
|
|
|
|
|
|
| 124 |
= 4.7.52 - 23.11.2022 =
|
| 125 |
Fix: Security fix
|
| 126 |
|
| 3 |
Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
|
| 4 |
Requires at least: 5.4
|
| 5 |
Tested up to: 6.1
|
| 6 |
+
Stable tag: 4.7.53
|
| 7 |
License: GPLv3
|
| 8 |
Text Domain: -
|
| 9 |
Requires PHP: 5.6
|
| 121 |
|
| 122 |
== Changelog ==
|
| 123 |
|
| 124 |
+
= 4.7.53 - 25.11.2022 =
|
| 125 |
+
Fix: Readlink error ( [#1142](https://github.com/WPChill/download-monitor/issues/1142) )
|
| 126 |
+
|
| 127 |
= 4.7.52 - 23.11.2022 =
|
| 128 |
Fix: Security fix
|
| 129 |
|
src/DownloadHandler.php
CHANGED
|
@@ -546,12 +546,12 @@ class DLM_Download_Handler {
|
|
| 546 |
$uploads_dir = wp_upload_dir();
|
| 547 |
$file_path = str_replace( DIRECTORY_SEPARATOR, '/', $file_path );
|
| 548 |
$basedir = str_replace( DIRECTORY_SEPARATOR, '/', $uploads_dir['basedir'] );
|
| 549 |
-
$sympath = str_replace( DIRECTORY_SEPARATOR, '/', readlink( $basedir ) );
|
| 550 |
|
| 551 |
if ( false !== strpos( $file_path, $basedir ) ) { // File is in the uploads' folder, so we need to create the correct URL.
|
| 552 |
// Set the URL for the uploads' folder.
|
| 553 |
$file_path = str_replace( str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $basedir ) ), str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $uploads_dir['baseurl'] ) ), $file_path );
|
| 554 |
-
} elseif (
|
| 555 |
// Set the URL for the uploads' folder.
|
| 556 |
$file_path = str_replace( str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $sympath ) ), str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $uploads_dir['baseurl'] ) ), $file_path );
|
| 557 |
} else { // This is the case if the file is not located in the uploads' folder.
|
| 546 |
$uploads_dir = wp_upload_dir();
|
| 547 |
$file_path = str_replace( DIRECTORY_SEPARATOR, '/', $file_path );
|
| 548 |
$basedir = str_replace( DIRECTORY_SEPARATOR, '/', $uploads_dir['basedir'] );
|
| 549 |
+
$sympath = ( is_link( $basedir ) ) ? str_replace( DIRECTORY_SEPARATOR, '/', readlink( $basedir ) ) : false;
|
| 550 |
|
| 551 |
if ( false !== strpos( $file_path, $basedir ) ) { // File is in the uploads' folder, so we need to create the correct URL.
|
| 552 |
// Set the URL for the uploads' folder.
|
| 553 |
$file_path = str_replace( str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $basedir ) ), str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $uploads_dir['baseurl'] ) ), $file_path );
|
| 554 |
+
} elseif ( $sympath && false !== strpos( $file_path, $sympath ) ) { // File is in the uploads' folder but in symlinked directory, so we need to create the correct URL.
|
| 555 |
// Set the URL for the uploads' folder.
|
| 556 |
$file_path = str_replace( str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $sympath ) ), str_replace( DIRECTORY_SEPARATOR, '/', trailingslashit( $uploads_dir['baseurl'] ) ), $file_path );
|
| 557 |
} else { // This is the case if the file is not located in the uploads' folder.
|
