s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) - Version 110913

Version Description

Download this release

Release Info

Developer PriMoThemes
Plugin Icon 128x128 s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members)
Version 110913
Comparing to
See all releases

Code changes from version 110912 to 110913

includes/classes/css-js-themes.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_css_js_themes"))
21
  {
@@ -45,7 +45,7 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_themes"))
45
  {
46
  $s2o = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"]; /* Loads s2Member only. */
47
  /**/
48
- wp_enqueue_style ("ws-plugin--s2member", $s2o . "/?ws_plugin__s2member_css=1&qcABC=1", array (), c_ws_plugin__s2member_utilities::ver_checksum (), "all");
49
  /**/
50
  do_action ("ws_plugin__s2member_during_add_css", get_defined_vars ());
51
  }
@@ -81,11 +81,11 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_themes"))
81
  $md5 = WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5; /* An MD5 hash based on global key => values. */
82
  /* The MD5 hash allows the script to be cached in the browser until the globals happen to change. */
83
  /* For instance, the global variables may change when a User who is logged-in changes their Profile. */
84
- wp_enqueue_script ("ws-plugin--s2member", $s2o . "/?ws_plugin__s2member_js_w_globals=" . urlencode ($md5) . "&qcABC=1", array ("jquery", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
85
  }
86
  else /* Else if they are not logged in, we distinguish the JavaScript file by NOT including $md5. */
87
  { /* This essentially creates 2 versions of the script. One while logged in & another when not. */
88
- wp_enqueue_script ("ws-plugin--s2member", $s2o . "/?ws_plugin__s2member_js_w_globals=1&qcABC=1", array ("jquery", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
89
  }
90
  /**/
91
  do_action ("ws_plugin__s2member_during_add_js_w_globals", get_defined_vars ());
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_css_js_themes"))
21
  {
45
  {
46
  $s2o = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"]; /* Loads s2Member only. */
47
  /**/
48
+ wp_enqueue_style ("ws-plugin--s2member", $s2o . "?ws_plugin__s2member_css=1&qcABC=1", array (), c_ws_plugin__s2member_utilities::ver_checksum (), "all");
49
  /**/
50
  do_action ("ws_plugin__s2member_during_add_css", get_defined_vars ());
51
  }
81
  $md5 = WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5; /* An MD5 hash based on global key => values. */
82
  /* The MD5 hash allows the script to be cached in the browser until the globals happen to change. */
83
  /* For instance, the global variables may change when a User who is logged-in changes their Profile. */
84
+ wp_enqueue_script ("ws-plugin--s2member", $s2o . "?ws_plugin__s2member_js_w_globals=" . urlencode ($md5) . "&qcABC=1", array ("jquery", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
85
  }
86
  else /* Else if they are not logged in, we distinguish the JavaScript file by NOT including $md5. */
87
  { /* This essentially creates 2 versions of the script. One while logged in & another when not. */
88
+ wp_enqueue_script ("ws-plugin--s2member", $s2o . "?ws_plugin__s2member_js_w_globals=1&qcABC=1", array ("jquery", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
89
  }
90
  /**/
91
  do_action ("ws_plugin__s2member_during_add_js_w_globals", get_defined_vars ());
includes/classes/register-in.inc.php CHANGED
@@ -43,6 +43,9 @@ if (!class_exists ("c_ws_plugin__s2member_register_in"))
43
  /**/
44
  if (!empty ($_GET["s2member_register"])) /* If they're attempting to access the registration system. */
45
  {
 
 
 
46
  if (is_array ($register = preg_split ("/\:\.\:\|\:\.\:/", c_ws_plugin__s2member_utils_encryption::decrypt (trim (stripslashes ($_GET["s2member_register"]))))))
47
  {
48
  if (count ($register) === 6 && !empty ($register[0]) && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time" && !empty ($register[1]) && !empty ($register[2]) && !empty ($register[3]) && !empty ($register[4]) && !empty ($register[5]))
43
  /**/
44
  if (!empty ($_GET["s2member_register"])) /* If they're attempting to access the registration system. */
45
  {
46
+ status_header (200); /* Send a 200 OK status header. This request IS being processed, one way or the other. */
47
+ eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
48
+ /**/
49
  if (is_array ($register = preg_split ("/\:\.\:\|\:\.\:/", c_ws_plugin__s2member_utils_encryption::decrypt (trim (stripslashes ($_GET["s2member_register"]))))))
50
  {
51
  if (count ($register) === 6 && !empty ($register[0]) && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time" && !empty ($register[1]) && !empty ($register[2]) && !empty ($register[3]) && !empty ($register[4]) && !empty ($register[5]))
includes/classes/utils-encryption.inc.php CHANGED
@@ -56,7 +56,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_encryption"))
56
  $encrypted = mcrypt_encrypt (MCRYPT_RIJNDAEL_256, $key, $string, MCRYPT_MODE_CBC, $iv);
57
  $encrypted = (strlen ($encrypted)) ? "~r2:" . $iv . "|" . $encrypted : "";
58
  /**/
59
- return ($base64 = str_replace (array ("+", "/", "="), array ("-", "_", "~"), base64_encode ($encrypted)));
60
  }
61
  else /* Fallback on XOR encryption. */
62
  return c_ws_plugin__s2member_utils_encryption::xencrypt ($string, $key);
@@ -82,7 +82,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_encryption"))
82
  $key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
83
  $key = (!is_string ($key) || !strlen ($key)) ? wp_salt () : $key;
84
  /**/
85
- $encrypted = base64_decode (str_replace (array ("-", "_", "~", "."), array ("+", "/", "=", "="), $base64));
86
  /**/
87
  if (function_exists ("mcrypt_decrypt") && in_array ("rijndael-256", mcrypt_list_algorithms ()) && in_array ("cbc", mcrypt_list_modes ()) && preg_match ("/^~r2\:(.+?)\|/", $encrypted, $v1))
88
  {
@@ -128,7 +128,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_encryption"))
128
  /**/
129
  $encrypted = (strlen ($encrypted)) ? "~xe|" . $encrypted : "";
130
  /**/
131
- return ($base64 = str_replace (array ("+", "/", "="), array ("-", "_", "~"), base64_encode ($encrypted)));
132
  }
133
  /**
134
  * XOR two-way encryption/decryption, with a base64 wrapper.
@@ -149,7 +149,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_encryption"))
149
  $key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
150
  $key = (!is_string ($key) || !strlen ($key)) ? wp_salt () : $key;
151
  /**/
152
- $encrypted = base64_decode (str_replace (array ("-", "_", "~", "."), array ("+", "/", "=", "="), $base64));
153
  /**/
154
  $encrypted = preg_replace ("/^~xe\|/", "", $encrypted, 1, $v1);
155
  $encrypted = ($v1) ? $encrypted : ""; /* Check validity. */
56
  $encrypted = mcrypt_encrypt (MCRYPT_RIJNDAEL_256, $key, $string, MCRYPT_MODE_CBC, $iv);
57
  $encrypted = (strlen ($encrypted)) ? "~r2:" . $iv . "|" . $encrypted : "";
58
  /**/
59
+ return ($base64 = c_ws_plugin__s2member_utils_strings::base64_url_safe_encode ($encrypted));
60
  }
61
  else /* Fallback on XOR encryption. */
62
  return c_ws_plugin__s2member_utils_encryption::xencrypt ($string, $key);
82
  $key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
83
  $key = (!is_string ($key) || !strlen ($key)) ? wp_salt () : $key;
84
  /**/
85
+ $encrypted = c_ws_plugin__s2member_utils_strings::base64_url_safe_decode ($base64);
86
  /**/
87
  if (function_exists ("mcrypt_decrypt") && in_array ("rijndael-256", mcrypt_list_algorithms ()) && in_array ("cbc", mcrypt_list_modes ()) && preg_match ("/^~r2\:(.+?)\|/", $encrypted, $v1))
88
  {
128
  /**/
129
  $encrypted = (strlen ($encrypted)) ? "~xe|" . $encrypted : "";
130
  /**/
131
+ return ($base64 = c_ws_plugin__s2member_utils_strings::base64_url_safe_encode ($encrypted));
132
  }
133
  /**
134
  * XOR two-way encryption/decryption, with a base64 wrapper.
149
  $key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
150
  $key = (!is_string ($key) || !strlen ($key)) ? wp_salt () : $key;
151
  /**/
152
+ $encrypted = c_ws_plugin__s2member_utils_strings::base64_url_safe_decode ($base64);
153
  /**/
154
  $encrypted = preg_replace ("/^~xe\|/", "", $encrypted, 1, $v1);
155
  $encrypted = ($v1) ? $encrypted : ""; /* Check validity. */
includes/classes/utils-html.inc.php CHANGED
@@ -60,9 +60,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_html"))
60
  echo '<script type="text/javascript">' . "var pwsL10n = {empty: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Strength indicator", "s2member-front", "s2member")) . "', short: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Very weak", "s2member-front", "s2member")) . "', bad: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Weak", "s2member-front", "s2member")) . "', good: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Medium", "s2member-front", "s2member")) . "', strong: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Strong", "s2member-front", "s2member")) . "', mismatch: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Mismatch", "s2member-front", "s2member")) . "'}; try{convertEntities(pwsL10n);}catch(e){};</script>" . "\n";
61
  echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-admin/js/password-strength-meter.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
62
  /**/
63
- echo '<script type="text/javascript" src="' . esc_attr ($s2o . "/?ws_plugin__s2member_js_w_globals=" . urlencode (WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5) . "&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ())) . '"></script>' . "\n";
64
  /**/
65
- echo '<link href="' . esc_attr ($s2o . "/?ws_plugin__s2member_css=1&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ())) . '" type="text/css" rel="stylesheet" media="all" />' . "\n";
66
  /**/
67
  if ($doctype_html_head_title) /* Add <title></title> tag? */
68
  echo '<title>' . $doctype_html_head_title . '</title>' . "\n";
60
  echo '<script type="text/javascript">' . "var pwsL10n = {empty: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Strength indicator", "s2member-front", "s2member")) . "', short: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Very weak", "s2member-front", "s2member")) . "', bad: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Weak", "s2member-front", "s2member")) . "', good: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Medium", "s2member-front", "s2member")) . "', strong: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Strong", "s2member-front", "s2member")) . "', mismatch: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Mismatch", "s2member-front", "s2member")) . "'}; try{convertEntities(pwsL10n);}catch(e){};</script>" . "\n";
61
  echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-admin/js/password-strength-meter.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
62
  /**/
63
+ echo '<script type="text/javascript" src="' . esc_attr ($s2o . "?ws_plugin__s2member_js_w_globals=" . urlencode (WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5) . "&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ())) . '"></script>' . "\n";
64
  /**/
65
+ echo '<link href="' . esc_attr ($s2o . "?ws_plugin__s2member_css=1&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ())) . '" type="text/css" rel="stylesheet" media="all" />' . "\n";
66
  /**/
67
  if ($doctype_html_head_title) /* Add <title></title> tag? */
68
  echo '<title>' . $doctype_html_head_title . '</title>' . "\n";
includes/classes/utils-s2o.inc.php CHANGED
@@ -84,13 +84,13 @@ if (!class_exists ("c_ws_plugin__s2member_utils_s2o"))
84
  if (($_wp_settings = preg_replace ($mu_plugins_section, $mu_plugins_replace, $_wp_settings, 1, $mu_plugins_replaced)) && $mu_plugins_replaced)
85
  {
86
  $nw_plugins_section = "/[\r\n\t\s ]+foreach *\( *wp_get_active_network_plugins *\( *\) *as *\\\$network_plugin *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include_once *\( *\\\$network_plugin *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*unset *\( *\\\$network_plugin *\);/";
87
- $nw_plugins_replace = /* Not even in the plugins directory? » */ "\n\$ws_plugin__s2member_temp_s = preg_replace (\"/-o.php\$/\", \".php\", __FILE__);\n\nif (!file_exists (WP_PLUGIN_DIR . \"/\" . plugin_basename (\$ws_plugin__s2member_temp_s)) && file_exists (\$ws_plugin__s2member_temp_s))\n\tinclude_once \$ws_plugin__s2member_temp_s;\n";
88
- $nw_plugins_replace .= "\n\$ws_plugin__s2member_temp_s = plugin_basename (preg_replace (\"/-o.php\$/\", \".php\", __FILE__));\n\$ws_plugin__s2member_temp_a = is_multisite () ? wp_get_active_network_plugins () : array ();\n\nif (in_array (WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a))\n\tinclude_once WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s;\n\nunset (\$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a);";
89
  if (($_wp_settings = preg_replace ($nw_plugins_section, $nw_plugins_replace, $_wp_settings, 1, $nw_plugins_replaced)) && $nw_plugins_replaced)
90
  {
91
  $st_plugins_section = "/[\r\n\t\s ]+foreach *\( *wp_get_active_and_valid_plugins *\( *\) *as *\\\$plugin *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include_once *\( *\\\$plugin *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*unset *\( *\\\$plugin *\);/";
92
- $st_plugins_replace = /* Not even in the plugins directory? » */ "\n\$ws_plugin__s2member_temp_s = preg_replace (\"/-o.php\$/\", \".php\", __FILE__);\n\nif (!file_exists (WP_PLUGIN_DIR . \"/\" . plugin_basename (\$ws_plugin__s2member_temp_s)) && file_exists (\$ws_plugin__s2member_temp_s))\n\tinclude_once \$ws_plugin__s2member_temp_s;\n";
93
- $st_plugins_replace .= "\n\$ws_plugin__s2member_temp_s = plugin_basename (preg_replace (\"/-o.php\$/\", \".php\", __FILE__));\n\$ws_plugin__s2member_temp_a = is_multisite () ? wp_get_active_and_valid_plugins () : array ();\n\nif (in_array (WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a))\n\tinclude_once WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s;\n\nunset (\$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a);";
94
  if (($_wp_settings = preg_replace ($st_plugins_section, $st_plugins_replace, $_wp_settings, 1, $st_plugins_replaced)) && $st_plugins_replaced)
95
  {
96
  $theme_funcs_section = "/(?:[\r\n\t\s ]+\/\/ Load the functions for the active theme, for both parent and child theme if applicable\.)?[\r\n\t\s ]+if *\( *\! *defined *\( *['\"]WP_INSTALLING['\"] *\) *\|\| *['\"]wp-activate.php['\"] *\=\=\= *\\\$pagenow *\)[\r\n\t\s ]*\{[\r\n\t\s ]*if *\( *TEMPLATEPATH *\!\=\= *STYLESHEETPATH *&& *file_exists *\( *STYLESHEETPATH *\. *['\"]\/functions\.php['\"] *\) *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include *\( *STYLESHEETPATH *\. *['\"]\/functions\.php['\"] *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*if *\( *file_exists *\( *TEMPLATEPATH *\. *['\"]\/functions\.php['\"] *\) *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include *\( *TEMPLATEPATH *\. *['\"]\/functions\.php['\"] *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*\}/";
84
  if (($_wp_settings = preg_replace ($mu_plugins_section, $mu_plugins_replace, $_wp_settings, 1, $mu_plugins_replaced)) && $mu_plugins_replaced)
85
  {
86
  $nw_plugins_section = "/[\r\n\t\s ]+foreach *\( *wp_get_active_network_plugins *\( *\) *as *\\\$network_plugin *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include_once *\( *\\\$network_plugin *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*unset *\( *\\\$network_plugin *\);/";
87
+ $nw_plugins_replace = /* Not even in the plugins directory? » */ "\n\$ws_plugin__s2member_temp_s = preg_replace (\"/-o\\.php\$/\", \".php\", __FILE__);\n\nif (!file_exists (WP_PLUGIN_DIR . \"/\" . plugin_basename (\$ws_plugin__s2member_temp_s)) && file_exists (\$ws_plugin__s2member_temp_s))\n\tinclude_once \$ws_plugin__s2member_temp_s;\n";
88
+ $nw_plugins_replace .= "\n\$ws_plugin__s2member_temp_s = plugin_basename (preg_replace (\"/-o\\.php\$/\", \".php\", __FILE__));\n\$ws_plugin__s2member_temp_a = is_multisite () ? wp_get_active_network_plugins () : array ();\n\nif (in_array (WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a))\n\tinclude_once WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s;\n\nunset (\$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a);";
89
  if (($_wp_settings = preg_replace ($nw_plugins_section, $nw_plugins_replace, $_wp_settings, 1, $nw_plugins_replaced)) && $nw_plugins_replaced)
90
  {
91
  $st_plugins_section = "/[\r\n\t\s ]+foreach *\( *wp_get_active_and_valid_plugins *\( *\) *as *\\\$plugin *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include_once *\( *\\\$plugin *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*unset *\( *\\\$plugin *\);/";
92
+ $st_plugins_replace = /* Not even in the plugins directory? » */ "\n\$ws_plugin__s2member_temp_s = preg_replace (\"/-o\\.php\$/\", \".php\", __FILE__);\n\nif (!file_exists (WP_PLUGIN_DIR . \"/\" . plugin_basename (\$ws_plugin__s2member_temp_s)) && file_exists (\$ws_plugin__s2member_temp_s))\n\tinclude_once \$ws_plugin__s2member_temp_s;\n";
93
+ $st_plugins_replace .= "\n\$ws_plugin__s2member_temp_s = plugin_basename (preg_replace (\"/-o\\.php\$/\", \".php\", __FILE__));\n\$ws_plugin__s2member_temp_a = wp_get_active_and_valid_plugins ();\n\nif (in_array (WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a))\n\tinclude_once WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s;\n\nunset (\$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a);";
94
  if (($_wp_settings = preg_replace ($st_plugins_section, $st_plugins_replace, $_wp_settings, 1, $st_plugins_replaced)) && $st_plugins_replaced)
95
  {
96
  $theme_funcs_section = "/(?:[\r\n\t\s ]+\/\/ Load the functions for the active theme, for both parent and child theme if applicable\.)?[\r\n\t\s ]+if *\( *\! *defined *\( *['\"]WP_INSTALLING['\"] *\) *\|\| *['\"]wp-activate.php['\"] *\=\=\= *\\\$pagenow *\)[\r\n\t\s ]*\{[\r\n\t\s ]*if *\( *TEMPLATEPATH *\!\=\= *STYLESHEETPATH *&& *file_exists *\( *STYLESHEETPATH *\. *['\"]\/functions\.php['\"] *\) *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include *\( *STYLESHEETPATH *\. *['\"]\/functions\.php['\"] *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*if *\( *file_exists *\( *TEMPLATEPATH *\. *['\"]\/functions\.php['\"] *\) *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include *\( *TEMPLATEPATH *\. *['\"]\/functions\.php['\"] *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*\}/";
includes/classes/utils-strings.inc.php CHANGED
@@ -212,6 +212,37 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
212
  {
213
  return '<span style="color:#164A61;">' . $m[0] . '</span>';
214
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  }
216
  }
217
  ?>
212
  {
213
  return '<span style="color:#164A61;">' . $m[0] . '</span>';
214
  }
215
+ /**
216
+ * Base64 URL-safe encoding.
217
+ *
218
+ * @package s2Member\Utilities
219
+ * @since 110913
220
+ *
221
+ * @param str $string Input string to be base64 encoded.
222
+ * @return str The base64 URL-safe encoded string.
223
+ */
224
+ public static function base64_url_safe_encode ($string = FALSE)
225
+ {
226
+ $string = (string)$string; /* Force to a string value. */
227
+ return rtrim (str_replace (array ("+", "/"), array ("-", "_"), base64_encode ($string)), "=");
228
+ }
229
+ /**
230
+ * Base64 URL-safe decoding.
231
+ *
232
+ * Note, this function is backward compatible with routines supplied by s2Member in the past;
233
+ * where padding characters were replaced with `~` or `.`, instead of being stripped completely.
234
+ *
235
+ * @package s2Member\Utilities
236
+ * @since 110913
237
+ *
238
+ * @param str $string Input string to be base64 decoded.
239
+ * @return str The decoded string.
240
+ */
241
+ public static function base64_url_safe_decode ($string = FALSE)
242
+ {
243
+ $string = rtrim ((string)$string, "=~."); /* Remove padding chars `=~.`; we'll add `=` padding below. */
244
+ return base64_decode (str_pad (str_replace (array ("-", "_"), array ("+", "/"), $string), strlen ($string) % 4, "=", STR_PAD_RIGHT));
245
+ }
246
  }
247
  }
248
  ?>
includes/dropins/mu-plugins/s2member-o.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
- /**
3
- * WordPress® with s2Member only.
4
- *
5
- * Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
- * ( coded in the USA )
8
- *
9
- * Released under the terms of the GNU General Public License.
10
- * You should have received a copy of the GNU General Public License,
11
- * along with this software. In the main directory, see: /licensing/
12
- * If not, see: {@link http://www.gnu.org/licenses/}.
13
- *
14
- * @package s2Member\Only
15
- * @since 110912
16
- */
17
- if (!empty ($_GET["s2member_only"]) && /* Not in admin panels. */ !is_admin ())
18
- {
19
- if (!class_exists ("c_ws_plugin__s2member_only"))
20
- {
21
- /**
22
- * WordPress® with s2Member only.
23
- *
24
- * @package s2Member\Only
25
- * @since 110912
26
- */
27
- class c_ws_plugin__s2member_only
28
- {
29
- /*
30
- * s2Member plugin only, filter.
31
- *
32
- * The `%s2member%` Replacement Code is filled before
33
- * this file is copied into the `/mu-plugins/` directory for WordPress®.
34
- *
35
- * @package s2Member\Only
36
- * @since 110912
37
- *
38
- * @return array Array with s2Member plugin only.
39
- */
40
- function filter () /* s2Member plugin only. */
41
- {
42
- return array ("%%s2member%%");
43
- }
44
- /*
45
- * s2Member only, if active.
46
- *
47
- * The `%s2member%` Replacement Code is filled before
48
- * this file is copied into the `/mu-plugins/` directory for WordPress®.
49
- *
50
- * @package s2Member\Only
51
- * @since 110912
52
- *
53
- * @return null
54
- */
55
- function if_active () /* s2Member only, if active. */
56
- {
57
- $active_plugins = is_multisite () ? wp_get_active_network_plugins () : array ();
58
- $active_plugins = array_merge ($active_plugins, wp_get_active_and_valid_plugins ());
59
- /**/
60
- if (in_array (WP_PLUGIN_DIR . "/%%s2member%%", $active_plugins) && !is_admin ())
61
- {
62
- add_filter ("pre_site_option_active_sitewide_plugins", "c_ws_plugin__s2member_only::filter", 100);
63
- add_filter ("pre_option_active_plugins", "c_ws_plugin__s2member_only::filter", 100);
64
- }
65
- /**/
66
- return; /* Return for uniformity. */
67
- }
68
- }
69
- }
70
- /**/
71
- c_ws_plugin__s2member_only::if_active (); /* s2Member only, if active. */
72
- }
73
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/menu-pages/menu-pages-s.js CHANGED
@@ -121,7 +121,7 @@ jQuery(document).ready (function($)
121
  /**/
122
  ws_plugin__s2member_enableSecurityKey = function() /* Allow Security Key editing?? */
123
  {
124
- if (confirm('Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you\'ve been testing s2Member, feel free to change this Key before you go live. Just don\'t go live, and then change it. You\'ll have some very unhappy Customers. Data corruption WILL occur!\n\nFor your safety, s2Member keeps a history of the last 10 Keys that you\'ve used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.'))
125
  $('input#ws-plugin--s2member-sec-encryption-key').removeAttr ('disabled');
126
  /**/
127
  return false;
@@ -375,7 +375,7 @@ jQuery(document).ready (function($)
375
  /**/
376
  var fieldId2Var = function(fieldId) /* Convert ids to variables. */
377
  {
378
- return( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
379
  };
380
  /**/
381
  var fieldTypeDesc = function(type)
121
  /**/
122
  ws_plugin__s2member_enableSecurityKey = function() /* Allow Security Key editing?? */
123
  {
124
+ if (confirm('Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you\'ve been testing s2Member, feel free to change this Key before you go live. Just don\'t go live, and then change it. You\'ll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you\'ve used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.'))
125
  $('input#ws-plugin--s2member-sec-encryption-key').removeAttr ('disabled');
126
  /**/
127
  return false;
375
  /**/
376
  var fieldId2Var = function(fieldId) /* Convert ids to variables. */
377
  {
378
+ return ( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
379
  };
380
  /**/
381
  var fieldTypeDesc = function(type)
includes/translations/s2member.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the s2Member package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: s2Member 110912\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
7
- "POT-Creation-Date: 2011-09-13 03:17:39+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -355,10 +355,10 @@ msgctxt "s2member-front"
355
  msgid "Profile updated successfully."
356
  msgstr ""
357
 
358
- #: s2member/includes/classes/register-in.inc.php:80
359
  #: s2member/includes/classes/register-in.inc.php:83
360
  #: s2member/includes/classes/register-in.inc.php:86
361
  #: s2member/includes/classes/register-in.inc.php:89
 
362
  #: s2member/includes/classes/sp-access.inc.php:131
363
  msgctxt "s2member-front"
364
  msgid "<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance."
2
  # This file is distributed under the same license as the s2Member package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: s2Member 110913\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
7
+ "POT-Creation-Date: 2011-09-14 05:34:03+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
355
  msgid "Profile updated successfully."
356
  msgstr ""
357
 
 
358
  #: s2member/includes/classes/register-in.inc.php:83
359
  #: s2member/includes/classes/register-in.inc.php:86
360
  #: s2member/includes/classes/register-in.inc.php:89
361
+ #: s2member/includes/classes/register-in.inc.php:92
362
  #: s2member/includes/classes/sp-access.inc.php:131
363
  msgctxt "s2member-front"
364
  msgid "<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance."
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === s2Member® ( Membership w/ PayPal® ) ===
2
 
3
- Version: 110912
4
- Stable tag: 110912
5
  Framework: WS-P-110523
6
 
7
  SSL Compatible: yes
@@ -178,6 +178,11 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
178
 
179
  == Changelog ==
180
 
 
 
 
 
 
181
  = v110912 =
182
  * (s2Member) **Compatibility**. This version of s2Member requires WordPress® v3.2+.
183
  * (s2Member) **Alternative View Protections**. s2Member's Alternative View Protections are now more flexible, allowing specific types of Protections to be applied individually now, instead of in groups. In addition, there are two new types of Alternative View Protection available: Comment Feeds (new), and WordPress® Navigation Menus (new). For further details, please check your Dashboard, under: `s2Member -> Restriction Options -> Alternative View Protections`.
1
  === s2Member® ( Membership w/ PayPal® ) ===
2
 
3
+ Version: 110913
4
+ Stable tag: 110913
5
  Framework: WS-P-110523
6
 
7
  SSL Compatible: yes
178
 
179
  == Changelog ==
180
 
181
+ = v110913 =
182
+ * (s2Member) **Compatibility**. s2Member v110912+ requires WordPress® v3.2+.
183
+ * (s2Member) **Bug fix**. A bug first introduced in s2Member v110912 related to JavaScript/CSS files not loading properly on some installations has been corrected in this release. One symptom of this bug was s2Member's failure to display Pro Form integrations properly in some cases. Another symptom may have been improper handling of Registration Form validations.
184
+ * (s2Member) **HostGator**. Tildas ( `~` ) found in some encrypted data strings were triggering `mod_security` conflicts on sites powered by HostGator. This release corrects the problem on HostGator by stripping tildas from query strings processed by s2Member. In addition, HostGator has been very helpful in white-listing the s2Member application across its entire network to prevent interruption of service. For further details, please check [this thread](http://www.primothemes.com/forums/viewtopic.php?f=36&t=14787#p35909).
185
+
186
  = v110912 =
187
  * (s2Member) **Compatibility**. This version of s2Member requires WordPress® v3.2+.
188
  * (s2Member) **Alternative View Protections**. s2Member's Alternative View Protections are now more flexible, allowing specific types of Protections to be applied individually now, instead of in groups. In addition, there are two new types of Alternative View Protection available: Comment Feeds (new), and WordPress® Navigation Menus (new). For further details, please check your Dashboard, under: `s2Member -> Restriction Options -> Alternative View Protections`.
s2member-o.php CHANGED
@@ -42,10 +42,10 @@ if (($ws_plugin__s2member_o_temp_a["wp_dir"] = c_ws_plugin__s2member_utils_s2o::
42
  Load WordPress®.
43
  */
44
  require($ws_plugin__s2member_o_temp_a["wp_dir"] . "/wp-load.php");
45
- eval("?>" . /* Settings after ``SHORTINIT``. */ $ws_plugin__s2member_o_temp_a["wp_settings_as"]);
46
  }
47
  else /* Else fallback on full WordPress®. */
48
  require($ws_plugin__s2member_o_temp_a["wp_dir"] . "/wp-load.php");
49
  }
50
- unset($ws_plugin__s2member_o_temp_a);
51
  ?>
42
  Load WordPress®.
43
  */
44
  require($ws_plugin__s2member_o_temp_a["wp_dir"] . "/wp-load.php");
45
+ eval ("?>" . /* Settings after ``SHORTINIT``. */ $ws_plugin__s2member_o_temp_a["wp_settings_as"]);
46
  }
47
  else /* Else fallback on full WordPress®. */
48
  require($ws_plugin__s2member_o_temp_a["wp_dir"] . "/wp-load.php");
49
  }
50
+ unset ($ws_plugin__s2member_o_temp_a);
51
  ?>
s2member.php CHANGED
@@ -19,8 +19,8 @@
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
- Version: 110912
23
- Stable tag: 110912
24
  Framework: WS-P-110523
25
 
26
  SSL Compatible: yes
@@ -65,7 +65,7 @@ Tags: membership, members, member, register, signup, paypal, paypal pro, pay pal
65
 
66
  -- end section for WordPress® parsing. ------------------------------------------------------------------------------- */
67
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
68
- exit("Do not access this file directly.");
69
  /**
70
  * The installed version of s2Member.
71
  *
@@ -75,7 +75,7 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
75
  * @var str
76
  */
77
  if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
78
- define ("WS_PLUGIN__S2MEMBER_VERSION", "110912");
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
@@ -105,7 +105,7 @@ if (!defined ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION"))
105
  * @var str
106
  */
107
  if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
- define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "110912");
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
@@ -116,7 +116,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
116
  /*
117
  Hook before loaded.
118
  */
119
- do_action("ws_plugin__s2member_before_loaded");
120
  /*
121
  System configuraton.
122
  */
@@ -128,7 +128,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
128
  /*
129
  Hook after system config & Hooks are loaded.
130
  */
131
- do_action("ws_plugin__s2member_config_hooks_loaded");
132
  /*
133
  Load a possible Pro module, if/when available.
134
  */
@@ -149,7 +149,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
149
  /*
150
  Hook after loaded.
151
  */
152
- do_action("ws_plugin__s2member_after_loaded");
153
  }
154
  /*
155
  Else NOT compatible. Do we need admin compatibility errors now?
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
+ Version: 110913
23
+ Stable tag: 110913
24
  Framework: WS-P-110523
25
 
26
  SSL Compatible: yes
65
 
66
  -- end section for WordPress® parsing. ------------------------------------------------------------------------------- */
67
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
68
+ exit ("Do not access this file directly.");
69
  /**
70
  * The installed version of s2Member.
71
  *
75
  * @var str
76
  */
77
  if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
78
+ define ("WS_PLUGIN__S2MEMBER_VERSION", "110913");
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
105
  * @var str
106
  */
107
  if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
+ define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "110913");
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
116
  /*
117
  Hook before loaded.
118
  */
119
+ do_action ("ws_plugin__s2member_before_loaded");
120
  /*
121
  System configuraton.
122
  */
128
  /*
129
  Hook after system config & Hooks are loaded.
130
  */
131
+ do_action ("ws_plugin__s2member_config_hooks_loaded");
132
  /*
133
  Load a possible Pro module, if/when available.
134
  */
149
  /*
150
  Hook after loaded.
151
  */
152
+ do_action ("ws_plugin__s2member_after_loaded");
153
  }
154
  /*
155
  Else NOT compatible. Do we need admin compatibility errors now?