mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Fixed Downloads security NGINX MD5 generation
- FIX: Blocker bug generating the wrong MD5 string for NGINX secure_link_md5 - FIX: Bad instructions in LAN_DL_SECURITY_DESCRIPTION
This commit is contained in:
@@ -43,7 +43,7 @@ class NginxSecureLinkMd5Decorator implements SecureLinkDecorator
|
||||
);
|
||||
$query_string = $url_parts['query'];
|
||||
parse_str($query_string, $query_args);
|
||||
$query_args['md5'] = md5($evaluation);
|
||||
$query_args['md5'] = str_replace(array('+', '/', '='), array('-', '_', ''), base64_encode(md5($evaluation, true)));
|
||||
if (strpos($prefs['download_security_expression'], '$secure_link_expires') !== false)
|
||||
$query_args['expires'] = $expiry;
|
||||
require_once(__DIR__.'/../includes/shim_http_build_url.php');
|
||||
|
@@ -231,7 +231,7 @@ define("DOWLAN_HELP_10", "Help for upload options");
|
||||
// define("DOWLAN_CAPTION", "Configure Download");
|
||||
|
||||
define("LAN_DL_SECURITY_DESCRIPTION", "Downloads can make use of server-side URL protection features to prevent hotlinking and/or enforce link expiry. " .
|
||||
"The download server needs to be configured first before setting the options below.");
|
||||
"This section should be configured before the download server is configured to reduce the chance of disruption to downloaders.");
|
||||
define("LAN_DL_SECURITY_MODE", "URL protection mode");
|
||||
define("LAN_DL_SECURITY_MODE_NONE", "None (Default)");
|
||||
define("LAN_DL_SECURITY_MODE_NGINX_SECURELINKMD5", "NGINX secure_link_md5");
|
||||
|
Reference in New Issue
Block a user