Version Description
Download this release
Release Info
| Developer | PriMoThemes |
| Plugin | |
| Version | 110617 |
| Comparing to | |
| See all releases | |
Code changes from version 110606 to 110617
- includes/classes/files-in.inc.php +38 -38
- includes/mime-types.ini +3 -0
- readme.txt +6 -2
- s2member.php +3 -3
includes/classes/files-in.inc.php
CHANGED
|
@@ -15,7 +15,7 @@
|
|
| 15 |
* @since 3.5
|
| 16 |
*/
|
| 17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
| 18 |
-
exit("Do not access this file directly.");
|
| 19 |
/**/
|
| 20 |
if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
| 21 |
{
|
|
@@ -45,23 +45,23 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 45 |
{
|
| 46 |
$excluded = apply_filters ("ws_plugin__s2member_check_file_download_access_excluded", false, get_defined_vars ());
|
| 47 |
/**/
|
| 48 |
-
if (!($using_amazon_s3_storage = 0) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"])
|
| 49 |
$using_amazon_s3_storage = true; /* Amazon® S3 storage has been configured! */
|
| 50 |
/**/
|
| 51 |
-
if (!$excluded && (empty ($_GET["s2member_file_download_key"]) || (!empty ($_GET["s2member_file_download_key"]) && !($file_download_key_is_valid = ($_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"]) || $_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"], "ip-forever") || $_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"], "universal"))))))
|
| 52 |
{
|
| 53 |
$_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/"); /* Trim slashes after Key comparison. */
|
| 54 |
/**/
|
| 55 |
if (!$using_amazon_s3_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
|
| 56 |
{
|
| 57 |
-
header("HTTP/1.0 404 Not Found"); /* The file does NOT even exist. */
|
| 58 |
-
exit("404: Sorry, file not found. Please contact Support for assistance.");
|
| 59 |
}
|
| 60 |
/**/
|
| 61 |
else if (!empty ($_GET["s2member_file_download_key"]) && !$file_download_key_is_valid) /* Invalid Key? */
|
| 62 |
{
|
| 63 |
-
header("HTTP/1.0 503 Service Temporarily Unavailable"); /* Invalid Download Keys are handled separately. */
|
| 64 |
-
exit("503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.");
|
| 65 |
}
|
| 66 |
/**/
|
| 67 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]) /* Is a Membership Options Page configured? */
|
|
@@ -72,11 +72,11 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 72 |
/**/
|
| 73 |
if (($file_download_access_is_allowed = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
|
| 74 |
{
|
| 75 |
-
header("HTTP/1.0 503 Service Temporarily Unavailable"); /* File downloads are NOT yet configured? */
|
| 76 |
-
exit("503: Sorry, File Downloads are NOT enabled yet. Please contact Support for assistance. If you are the site owner, please configure: `s2Member -> Download Options -> Basic Download Restrictions`.");
|
| 77 |
}
|
| 78 |
/**/
|
| 79 |
-
else if (!is_object ($user = apply_filters ("ws_plugin__s2member_check_file_download_access_user", ((is_user_logged_in ()) ? wp_get_current_user () : false), get_defined_vars ())) || !($user_id = $user->ID))
|
| 80 |
{
|
| 81 |
if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $_GET["s2member_file_download"], $m))
|
| 82 |
{
|
|
@@ -124,7 +124,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 124 |
{
|
| 125 |
if (strtotime ($file_download_access_log_entry["date"]) < strtotime ("-" . $max_days_logged . " days"))
|
| 126 |
{
|
| 127 |
-
unset($file_download_access_log[$file_download_access_log_entry_key]);
|
| 128 |
$file_download_access_arc[] = $file_download_access_log_entry;
|
| 129 |
}
|
| 130 |
else if (strtotime ($file_download_access_log_entry["date"]) >= strtotime ("-" . $file_downloads["allowed_days"] . " days"))
|
|
@@ -152,14 +152,14 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 152 |
/**/
|
| 153 |
if (!$using_amazon_s3_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
|
| 154 |
{
|
| 155 |
-
header("HTTP/1.0 404 Not Found"); /* The file does NOT even exist. */
|
| 156 |
-
exit("404: Sorry, file not found. Please contact Support for assistance.");
|
| 157 |
}
|
| 158 |
}
|
| 159 |
/*
|
| 160 |
Here we are going to put together all of the File Download information.
|
| 161 |
*/
|
| 162 |
-
$extension = strtolower (substr ($_GET["s2member_file_download"], strrpos ($_GET["s2member_file_download"], "."))); /* To lowercase. */
|
| 163 |
/**/
|
| 164 |
$mimetypes = parse_ini_file (dirname (dirname (dirname (__FILE__))) . "/includes/mime-types.ini"); /* Types provided by: `mime-types.ini`. */
|
| 165 |
$mimetype = ($mimetypes[$extension]) ? $mimetypes[$extension] : "application/octet-stream"; /* Lookup the MIME type for this file extension. */
|
|
@@ -171,7 +171,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 171 |
$pathinfo = (!$using_amazon_s3_storage) ? pathinfo (($file = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"])) : array ();
|
| 172 |
$length = (!$using_amazon_s3_storage && $file) ? filesize ($file) : -1; /* The overall file size, in bytes. */
|
| 173 |
/**/
|
| 174 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
| 175 |
do_action ("ws_plugin__s2member_during_file_download_access", get_defined_vars ());
|
| 176 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
| 177 |
/**/
|
|
@@ -188,50 +188,50 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 188 |
$amazon_s3_redirection_url .= "&Expires=" . urlencode ($amazon_s3_file_expires);
|
| 189 |
$amazon_s3_redirection_url .= "&Signature=" . urlencode ($amazon_s3_signature);
|
| 190 |
/**/
|
| 191 |
-
wp_redirect($amazon_s3_redirection_url); /* 302 redirection. */
|
| 192 |
/**/
|
| 193 |
exit (); /* Clean exit. */
|
| 194 |
}
|
| 195 |
/**/
|
| 196 |
else /* Else, using localized storage ( default ). */
|
| 197 |
{
|
| 198 |
-
@set_time_limit(0); /* Unlimited. */
|
| 199 |
@ini_set ("zlib.output_compression", 0);
|
| 200 |
/**/
|
| 201 |
-
header("Accept-Ranges: none");
|
| 202 |
-
header("Content-Encoding: none");
|
| 203 |
-
header("Content-Type: " . $mimetype);
|
| 204 |
-
header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
|
| 205 |
-
header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
|
| 206 |
-
header("Cache-Control: no-cache, must-revalidate, max-age=0");
|
| 207 |
header ("Cache-Control: post-check=0, pre-check=0", false);
|
| 208 |
-
header("Pragma: no-cache");
|
| 209 |
/**/
|
| 210 |
-
header('Content-Disposition: ' . (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"');
|
| 211 |
/**/
|
| 212 |
if ($length && apply_filters ("ws_plugin__s2member_stream_file_downloads", true, get_defined_vars ()) && ($stream = fopen ($file, "rb")))
|
| 213 |
{
|
| 214 |
$_stream_w_content_length = (preg_match ("/^win/i", PHP_OS)) ? false : true; /* Windows® IIS does not jive here. */
|
| 215 |
/* Windows® IIS doesn't seem to like it when both `Content-Length` and `Transfer-Encoding: chunked` are sent together. */
|
| 216 |
if (apply_filters ("ws_plugin__s2member_stream_file_downloads_w_content_length", $_stream_w_content_length, get_defined_vars ()))
|
| 217 |
-
header("Content-Length: " . $length);
|
| 218 |
/**/
|
| 219 |
-
header("Transfer-Encoding: chunked"); /* Uses `Transfer-Encoding: chunked` for simulated streaming. */
|
| 220 |
/**/
|
| 221 |
-
eval('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
|
| 222 |
/**/
|
| 223 |
while (!feof ($stream) && ($chunk_size = strlen ($data = fread ($stream, 2097152))))
|
| 224 |
-
eval('echo dechex ($chunk_size) . "\r\n". $data . "\r\n"; @flush ();');
|
| 225 |
/**/
|
| 226 |
-
fclose($stream);
|
| 227 |
/**/
|
| 228 |
-
exit("0\r\n\r\n");
|
| 229 |
}
|
| 230 |
else if ($length) /* Else `file_get_contents()`. */
|
| 231 |
{
|
| 232 |
-
header("Content-Length: " . $length);
|
| 233 |
/**/
|
| 234 |
-
exit(file_get_contents ($file));
|
| 235 |
}
|
| 236 |
else
|
| 237 |
exit (); /* Empty file. */
|
|
@@ -252,7 +252,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 252 |
public static function amazon_s3_sign ($data = FALSE)
|
| 253 |
{
|
| 254 |
$key = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"];
|
| 255 |
-
$key = str_pad (((strlen ($key) > 64) ? pack ('H*', sha1 ($key)) : $key), 64, chr (0x00));
|
| 256 |
return pack ('H*', sha1 (($key ^ str_repeat (chr (0x5c), 64)) . pack ('H*', sha1 (($key ^ str_repeat (chr (0x36), 64)) . $data))));
|
| 257 |
}
|
| 258 |
/**
|
|
@@ -268,7 +268,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 268 |
*/
|
| 269 |
public static function _file_remote_authorization ($user = FALSE)
|
| 270 |
{
|
| 271 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
| 272 |
do_action ("_ws_plugin__s2member_before_file_remote_authorization", get_defined_vars ());
|
| 273 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
| 274 |
/**/
|
|
@@ -278,9 +278,9 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
|
| 278 |
/**/
|
| 279 |
if (empty ($_SERVER["PHP_AUTH_USER"]) || empty ($_SERVER["PHP_AUTH_PW"]) || !user_pass_ok ($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
|
| 280 |
{
|
| 281 |
-
header('WWW-Authenticate: Basic realm="Members Only"');
|
| 282 |
-
header("HTTP/1.0 401 Unauthorized");
|
| 283 |
-
exit("Access Denied");
|
| 284 |
}
|
| 285 |
else if (is_object ($_user = new WP_User ($_SERVER["PHP_AUTH_USER"])) && $_user->ID)
|
| 286 |
{
|
| 15 |
* @since 3.5
|
| 16 |
*/
|
| 17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
| 18 |
+
exit ("Do not access this file directly.");
|
| 19 |
/**/
|
| 20 |
if (!class_exists ("c_ws_plugin__s2member_files_in"))
|
| 21 |
{
|
| 45 |
{
|
| 46 |
$excluded = apply_filters ("ws_plugin__s2member_check_file_download_access_excluded", false, get_defined_vars ());
|
| 47 |
/**/
|
| 48 |
+
if (! ($using_amazon_s3_storage = 0) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"])
|
| 49 |
$using_amazon_s3_storage = true; /* Amazon® S3 storage has been configured! */
|
| 50 |
/**/
|
| 51 |
+
if (!$excluded && (empty ($_GET["s2member_file_download_key"]) || (!empty ($_GET["s2member_file_download_key"]) && ! ($file_download_key_is_valid = ($_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"]) || $_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"], "ip-forever") || $_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"], "universal"))))))
|
| 52 |
{
|
| 53 |
$_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/"); /* Trim slashes after Key comparison. */
|
| 54 |
/**/
|
| 55 |
if (!$using_amazon_s3_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
|
| 56 |
{
|
| 57 |
+
header ("HTTP/1.0 404 Not Found"); /* The file does NOT even exist. */
|
| 58 |
+
exit ("404: Sorry, file not found. Please contact Support for assistance.");
|
| 59 |
}
|
| 60 |
/**/
|
| 61 |
else if (!empty ($_GET["s2member_file_download_key"]) && !$file_download_key_is_valid) /* Invalid Key? */
|
| 62 |
{
|
| 63 |
+
header ("HTTP/1.0 503 Service Temporarily Unavailable"); /* Invalid Download Keys are handled separately. */
|
| 64 |
+
exit ("503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.");
|
| 65 |
}
|
| 66 |
/**/
|
| 67 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]) /* Is a Membership Options Page configured? */
|
| 72 |
/**/
|
| 73 |
if (($file_download_access_is_allowed = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
|
| 74 |
{
|
| 75 |
+
header ("HTTP/1.0 503 Service Temporarily Unavailable"); /* File downloads are NOT yet configured? */
|
| 76 |
+
exit ("503: Sorry, File Downloads are NOT enabled yet. Please contact Support for assistance. If you are the site owner, please configure: `s2Member -> Download Options -> Basic Download Restrictions`.");
|
| 77 |
}
|
| 78 |
/**/
|
| 79 |
+
else if (!is_object ($user = apply_filters ("ws_plugin__s2member_check_file_download_access_user", ( (is_user_logged_in ()) ? wp_get_current_user () : false), get_defined_vars ())) || ! ($user_id = $user->ID))
|
| 80 |
{
|
| 81 |
if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $_GET["s2member_file_download"], $m))
|
| 82 |
{
|
| 124 |
{
|
| 125 |
if (strtotime ($file_download_access_log_entry["date"]) < strtotime ("-" . $max_days_logged . " days"))
|
| 126 |
{
|
| 127 |
+
unset ($file_download_access_log[$file_download_access_log_entry_key]);
|
| 128 |
$file_download_access_arc[] = $file_download_access_log_entry;
|
| 129 |
}
|
| 130 |
else if (strtotime ($file_download_access_log_entry["date"]) >= strtotime ("-" . $file_downloads["allowed_days"] . " days"))
|
| 152 |
/**/
|
| 153 |
if (!$using_amazon_s3_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
|
| 154 |
{
|
| 155 |
+
header ("HTTP/1.0 404 Not Found"); /* The file does NOT even exist. */
|
| 156 |
+
exit ("404: Sorry, file not found. Please contact Support for assistance.");
|
| 157 |
}
|
| 158 |
}
|
| 159 |
/*
|
| 160 |
Here we are going to put together all of the File Download information.
|
| 161 |
*/
|
| 162 |
+
$extension = strtolower (substr ($_GET["s2member_file_download"], strrpos ($_GET["s2member_file_download"], ".") + 1)); /* To lowercase. */
|
| 163 |
/**/
|
| 164 |
$mimetypes = parse_ini_file (dirname (dirname (dirname (__FILE__))) . "/includes/mime-types.ini"); /* Types provided by: `mime-types.ini`. */
|
| 165 |
$mimetype = ($mimetypes[$extension]) ? $mimetypes[$extension] : "application/octet-stream"; /* Lookup the MIME type for this file extension. */
|
| 171 |
$pathinfo = (!$using_amazon_s3_storage) ? pathinfo (($file = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"])) : array ();
|
| 172 |
$length = (!$using_amazon_s3_storage && $file) ? filesize ($file) : -1; /* The overall file size, in bytes. */
|
| 173 |
/**/
|
| 174 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
| 175 |
do_action ("ws_plugin__s2member_during_file_download_access", get_defined_vars ());
|
| 176 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
| 177 |
/**/
|
| 188 |
$amazon_s3_redirection_url .= "&Expires=" . urlencode ($amazon_s3_file_expires);
|
| 189 |
$amazon_s3_redirection_url .= "&Signature=" . urlencode ($amazon_s3_signature);
|
| 190 |
/**/
|
| 191 |
+
wp_redirect ($amazon_s3_redirection_url); /* 302 redirection. */
|
| 192 |
/**/
|
| 193 |
exit (); /* Clean exit. */
|
| 194 |
}
|
| 195 |
/**/
|
| 196 |
else /* Else, using localized storage ( default ). */
|
| 197 |
{
|
| 198 |
+
@set_time_limit (0); /* Unlimited. */
|
| 199 |
@ini_set ("zlib.output_compression", 0);
|
| 200 |
/**/
|
| 201 |
+
header ("Accept-Ranges: none");
|
| 202 |
+
header ("Content-Encoding: none");
|
| 203 |
+
header ("Content-Type: " . $mimetype);
|
| 204 |
+
header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
|
| 205 |
+
header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
|
| 206 |
+
header ("Cache-Control: no-cache, must-revalidate, max-age=0");
|
| 207 |
header ("Cache-Control: post-check=0, pre-check=0", false);
|
| 208 |
+
header ("Pragma: no-cache");
|
| 209 |
/**/
|
| 210 |
+
header ('Content-Disposition: ' . (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"');
|
| 211 |
/**/
|
| 212 |
if ($length && apply_filters ("ws_plugin__s2member_stream_file_downloads", true, get_defined_vars ()) && ($stream = fopen ($file, "rb")))
|
| 213 |
{
|
| 214 |
$_stream_w_content_length = (preg_match ("/^win/i", PHP_OS)) ? false : true; /* Windows® IIS does not jive here. */
|
| 215 |
/* Windows® IIS doesn't seem to like it when both `Content-Length` and `Transfer-Encoding: chunked` are sent together. */
|
| 216 |
if (apply_filters ("ws_plugin__s2member_stream_file_downloads_w_content_length", $_stream_w_content_length, get_defined_vars ()))
|
| 217 |
+
header ("Content-Length: " . $length);
|
| 218 |
/**/
|
| 219 |
+
header ("Transfer-Encoding: chunked"); /* Uses `Transfer-Encoding: chunked` for simulated streaming. */
|
| 220 |
/**/
|
| 221 |
+
eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
|
| 222 |
/**/
|
| 223 |
while (!feof ($stream) && ($chunk_size = strlen ($data = fread ($stream, 2097152))))
|
| 224 |
+
eval ('echo dechex ($chunk_size) . "\r\n". $data . "\r\n"; @flush ();');
|
| 225 |
/**/
|
| 226 |
+
fclose ($stream);
|
| 227 |
/**/
|
| 228 |
+
exit ("0\r\n\r\n");
|
| 229 |
}
|
| 230 |
else if ($length) /* Else `file_get_contents()`. */
|
| 231 |
{
|
| 232 |
+
header ("Content-Length: " . $length);
|
| 233 |
/**/
|
| 234 |
+
exit (file_get_contents ($file));
|
| 235 |
}
|
| 236 |
else
|
| 237 |
exit (); /* Empty file. */
|
| 252 |
public static function amazon_s3_sign ($data = FALSE)
|
| 253 |
{
|
| 254 |
$key = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"];
|
| 255 |
+
$key = str_pad (( (strlen ($key) > 64) ? pack ('H*', sha1 ($key)) : $key), 64, chr (0x00));
|
| 256 |
return pack ('H*', sha1 (($key ^ str_repeat (chr (0x5c), 64)) . pack ('H*', sha1 (($key ^ str_repeat (chr (0x36), 64)) . $data))));
|
| 257 |
}
|
| 258 |
/**
|
| 268 |
*/
|
| 269 |
public static function _file_remote_authorization ($user = FALSE)
|
| 270 |
{
|
| 271 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
| 272 |
do_action ("_ws_plugin__s2member_before_file_remote_authorization", get_defined_vars ());
|
| 273 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
| 274 |
/**/
|
| 278 |
/**/
|
| 279 |
if (empty ($_SERVER["PHP_AUTH_USER"]) || empty ($_SERVER["PHP_AUTH_PW"]) || !user_pass_ok ($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
|
| 280 |
{
|
| 281 |
+
header ('WWW-Authenticate: Basic realm="Members Only"');
|
| 282 |
+
header ("HTTP/1.0 401 Unauthorized");
|
| 283 |
+
exit ("Access Denied");
|
| 284 |
}
|
| 285 |
else if (is_object ($_user = new WP_User ($_SERVER["PHP_AUTH_USER"])) && $_user->ID)
|
| 286 |
{
|
includes/mime-types.ini
CHANGED
|
@@ -253,6 +253,9 @@ qt = video/quicktime
|
|
| 253 |
viv = video/vnd.vivo
|
| 254 |
vivo = video/vnd.vivo
|
| 255 |
mp4 = video/mp4
|
|
|
|
|
|
|
|
|
|
| 256 |
|
| 257 |
[image]
|
| 258 |
bmp = image/bmp
|
| 253 |
viv = video/vnd.vivo
|
| 254 |
vivo = video/vnd.vivo
|
| 255 |
mp4 = video/mp4
|
| 256 |
+
ogv = video/ogg
|
| 257 |
+
ogg = video/ogg
|
| 258 |
+
webm = video/webm
|
| 259 |
|
| 260 |
[image]
|
| 261 |
bmp = image/bmp
|
readme.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
=== s2Member® ( Membership w/ PayPal® ) ===
|
| 2 |
|
| 3 |
-
Version:
|
| 4 |
-
Stable tag:
|
| 5 |
Framework: WS-P-110523
|
| 6 |
|
| 7 |
SSL Compatible: yes
|
|
@@ -173,6 +173,10 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
|
|
| 173 |
|
| 174 |
== Changelog ==
|
| 175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
= v110606 =
|
| 177 |
* **(s2Member). MailChimp® over SSL.** s2Member has been updated to communicate with the MailChimp® API over SSL, for improved security. No action or reconfiguration is necessary, as this only affects the HTTP protocol used during communication with the MailChimp® API.
|
| 178 |
* **(s2Member). Documentation update.** s2Member has been updated to mention the PHP Execution plugin, which is required to take full advantage of `"Advanced" Download Restrictions`, through the application of a File Download Key. The creation of a File Download `Key`, requires a small PHP code snippet. In order to use PHP scripting inside your Posts/Pages, you'll need to install this handy plugin ( [PHP Execution](http://wordpress.org/extend/plugins/php-execution-plugin/) ).
|
| 1 |
=== s2Member® ( Membership w/ PayPal® ) ===
|
| 2 |
|
| 3 |
+
Version: 110617
|
| 4 |
+
Stable tag: 110617
|
| 5 |
Framework: WS-P-110523
|
| 6 |
|
| 7 |
SSL Compatible: yes
|
| 173 |
|
| 174 |
== Changelog ==
|
| 175 |
|
| 176 |
+
= v110617 =
|
| 177 |
+
* **(s2Member)** Bug fix. ** A bug first introduced in s2Member v110604 has been corrected. This bug was hindering s2Member's ability to identify MIME types for protected File Downloads.
|
| 178 |
+
* **(s2Member)** HTML 5 MIME types. ** s2Member has been updated to provide support through File Download protection for HTML 5 MIME types: `video/ogg` and `video/webm`.
|
| 179 |
+
|
| 180 |
= v110606 =
|
| 181 |
* **(s2Member). MailChimp® over SSL.** s2Member has been updated to communicate with the MailChimp® API over SSL, for improved security. No action or reconfiguration is necessary, as this only affects the HTTP protocol used during communication with the MailChimp® API.
|
| 182 |
* **(s2Member). Documentation update.** s2Member has been updated to mention the PHP Execution plugin, which is required to take full advantage of `"Advanced" Download Restrictions`, through the application of a File Download Key. The creation of a File Download `Key`, requires a small PHP code snippet. In order to use PHP scripting inside your Posts/Pages, you'll need to install this handy plugin ( [PHP Execution](http://wordpress.org/extend/plugins/php-execution-plugin/) ).
|
s2member.php
CHANGED
|
@@ -19,8 +19,8 @@
|
|
| 19 |
*/
|
| 20 |
/* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
|
| 21 |
|
| 22 |
-
Version:
|
| 23 |
-
Stable tag:
|
| 24 |
Framework: WS-P-110523
|
| 25 |
|
| 26 |
SSL Compatible: yes
|
|
@@ -70,7 +70,7 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
|
| 70 |
* @var str
|
| 71 |
*/
|
| 72 |
if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
|
| 73 |
-
define ("WS_PLUGIN__S2MEMBER_VERSION", "
|
| 74 |
/**
|
| 75 |
* Minimum PHP version required to run s2Member.
|
| 76 |
*
|
| 19 |
*/
|
| 20 |
/* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
|
| 21 |
|
| 22 |
+
Version: 110617
|
| 23 |
+
Stable tag: 110617
|
| 24 |
Framework: WS-P-110523
|
| 25 |
|
| 26 |
SSL Compatible: yes
|
| 70 |
* @var str
|
| 71 |
*/
|
| 72 |
if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
|
| 73 |
+
define ("WS_PLUGIN__S2MEMBER_VERSION", "110617");
|
| 74 |
/**
|
| 75 |
* Minimum PHP version required to run s2Member.
|
| 76 |
*
|
