Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:24-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13075 2011-12-20T09:50:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=57811#p57811 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:50 am


]]>
2011-12-07T01:03:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=55493#p55493 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: December 7, 2011, 1:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:03 am


]]>
2011-11-05T19:26:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=51867#p51867 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: November 5, 2011, 8:26 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:26 pm


]]>
2011-10-29T20:35:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=49962#p49962 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: October 29, 2011, 9:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:35 pm


]]>
2011-10-17T15:39:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=47756#p47756 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: October 17, 2011, 1:39 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:39 pm


]]>
2011-10-11T14:35:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=46157#p46157 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: October 11, 2011, 12:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:35 pm


]]>
2011-10-03T15:47:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=44287#p44287 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: October 3, 2011, 1:47 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:47 pm


]]>
2011-10-03T03:41:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=42994#p42994 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: October 3, 2011, 1:41 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:41 am


]]>
2011-09-27T05:26:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=41240#p41240 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: September 27, 2011, 3:26 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:26 am


]]>
2011-09-26T21:03:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=39996#p39996 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: September 26, 2011, 7:03 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:03 pm


]]>
2011-09-17T16:20:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=38138#p38138 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: September 17, 2011, 2:20 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:20 pm


]]>
2011-09-14T01:27:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=36719#p36719 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: September 13, 2011, 11:28 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:27 am


]]>
2011-09-13T12:03:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=35447#p35447 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: September 13, 2011, 10:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:03 pm


]]>
2011-08-15T15:14:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=31568#p31568 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: August 15, 2011, 4:14 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\ssl-in.inc.php ?php /** * SSL routines ( inner processing routines ). * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\SSL * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_ssl_in" ) ) { /** * SSL routines ( inner processing routines ). * * @package s2Member\SSL * @since 3.5 */ class c_ws_plugin__s2member_ssl_in { /** * Forces SSL on specific Posts/Pages, or any page for that matter. * * Triggered by Custom Field: `s2member_force_ssl = yes|port#` * * Triggered by: `?s2-ssl` or `?s2-ssl=yes|port#`. * * @package s2Member\SSL * @since 3.5 * * @attaches-to: ``add_action("init");`` * @attaches-to: ``add_action("template_redirect");`` * * @return null Possibly exiting script execution after redirection to SSL variation. */ public static function force_ssl ( $vars = array ( ) ) /* Phase 2 of ``c_ws_plugin__s2member_ssl::check_force_ssl()``. */ { extract ( $vars ) ; /* Extract all vars passed in from: ``c_ws_plugin__s2member_ssl::check_force_ssl()``. */ /**/ $force_ssl = ( ! is_string ( $force_ssl ) ) ? (string) (int) $force_ssl : $force_ssl ; /* Force string. */ $force_ssl = ( is_numeric ( $force_ssl ) && $force_ssl 1 ) ? $force_ssl : "yes" ; /* Use `yes`. */ /**/ $ssl_host = preg_replace ( "/\:[0-9]+$/" , "" , $_SERVER [ "HTTP_HOST" ] ) ; /* Remove port here. */ $ssl_port = ( is_numeric ( $force_ssl ) && $force_ssl 1 ) ? $force_ssl : false ; /* Port? */ $ssl_host_port = $ssl_host . ( ( $ssl_port ) ? ":" . $ssl_port : "" ) ; /* Use port # ? */ /**/ if ( ! is_ssl ( ) || ! isset ( $_GET [ $s2_ssl_gv ] ) ) /* SSL must be enabled. */ { $https = "https://" . $ssl_host_port . $_SERVER [ "REQUEST_URI" ] ; $https_with_s2_ssl_gv = add_query_arg ( $s2_ssl_gv , urlencode ( $force_ssl ) , $https ) ; /**/ wp_redirect ( $https_with_s2_ssl_gv ) ; /* Redirect to https. */ exit ( ) ; /* Clean exit. */ } else /* Otherwise, we buffer all output, and switch all content over to https. */ /* Also, we assume here that other links on the site should NOT be converted to https. */ { add_filter ( "redirect_canonical" , "__return_false" ) ; /**/ define ( "_ws_plugin__s2member_force_ssl_host" , $ssl_host ) ; define ( "_ws_plugin__s2member_force_ssl_port" , $ssl_port ) ; define ( "_ws_plugin__s2member_force_ssl_host_port" , $ssl_host_port ) ; /**/ /* Filter these. We do NOT want to create a sitewide https conversion! */ add_filter ( "home_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 3 ) ; add_filter ( "network_home_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 3 ) ; add_filter ( "site_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 3 ) ; add_filter ( "network_site_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 3 ) ; /* These additional URLs are NOT Filtered by default; but can be if needed. Use these Filters. */ if ( apply_filters ( "_ws_plugin__s2member_force_non_ssl_scheme_plugins_url" , false , get_defined_vars ( ) ) ) add_filter ( "plugins_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 2 ) ; /* These additional URLs are NOT Filtered by default; but can be if needed. Use these Filters. */ if ( apply_filters ( "_ws_plugin__s2member_force_non_ssl_scheme_content_url" , false , get_defined_vars ( ) ) ) add_filter ( "content_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 2 ) ; /**/ if ( ! function_exists ( "_ws_plugin__s2member_force_ssl_buffer" ) ) { function _ws_plugin__s2member_force_ssl_buffer ( $buffer = FALSE ) { $o_pcre = @ ini_get ( "pcre.backtrack_limit" ) ; /* Current configuration. */ /**/ @ ini_set ( "pcre.backtrack_limit" , 10000000 ) ; /* Expands abilities for this routine. */ /**/ $ssl_tags = array ( "script" , "style" , "link" , "img" , "input" , "iframe" , "object" , "embed" ) ; $ssl_tags = apply_filters ( "_ws_plugin__s2member_force_ssl_buffer_tags_array" , $ssl_tags , get_defined_vars ( ) ) ; $ssl_tags = array_unique ( array_map ( "strtolower" , $ssl_tags ) ) ; /* This array should be lowercase / unique. */ /**/ $ssl_regex_tags = implode ( "|" , array_map ( "preg_quote" , $ssl_tags ) ) ; /* Prepare for regex. */ /**/ $buffer = ( $ssl_regex_tags ) ? preg_replace_callback ( "/\(" . $ssl_regex_tags . ")(?![a-z_0-9\-])[^\]+\/i" , "_ws_plugin__s2member_force_ssl_buffer_callback" , $buffer ) : $buffer ; $buffer = ( in_array ( "object" , $ssl_tags ) ) ? preg_replace_callback ( "/\object(?![a-z_0-9\-])[^\]*\.*?\\/object\/is" , "_ws_plugin__s2member_force_ssl_buffer_callback" , $buffer ) : $buffer ; $buffer = ( in_array ( "script" , $ssl_tags ) ) ? preg_replace_callback ( "/\script(?![a-z_0-9\-])[^\]*\.*?\\/script\/is" , "_ws_plugin__s2member_force_ssl_buffer_callback" , $buffer ) : $buffer ; $buffer = ( in_array ( "style" , $ssl_tags ) ) ? preg_replace_callback ( "/\style(?![a-z_0-9\-])[^\]*\.*?\\/style\/is" , "_ws_plugin__s2member_force_ssl_buffer_callback" , $buffer ) : $buffer ; /**/ $non_ssl_tags = array ( "a" ) ; /* Tags that should NOT contain SSL-enabled links in them. Prevents site-wide conversions */ $non_ssl_tags = apply_filters ( "_ws_plugin__s2member_force_non_ssl_buffer_tags_array" , $non_ssl_tags , get_defined_vars ( ) ) ; $non_ssl_tags = array_unique ( array_map ( "strtolower" , $non_ssl_tags ) ) ; /* This array should be lowercase / unique. */ /**/ $non_ssl_regex_tags = implode ( "|" , array_map ( "preg_quote" , $non_ssl_tags ) ) ; /* Prepare for regex. */ /**/ $buffer = ( $non_ssl_regex_tags ) ? preg_replace_callback ( "/\(" . $non_ssl_regex_tags . ")(?![a-z_0-9\-])[^\]+\/i" , "_ws_plugin__s2member_force_non_ssl_buffer_callback" , $buffer ) : $buffer ; /**/ @ ini_set ( "pcre.backtrack_limit" , $o_pcre ) ; /* Restores previous configuration value now. */ /**/ return apply_filters ( "_ws_plugin__s2member_force_ssl_buffer" , $buffer , get_defined_vars ( ) ) ; } } /**/ if ( ! function_exists ( "_ws_plugin__s2member_force_ssl_buffer_callback" ) ) { function _ws_plugin__s2member_force_ssl_buffer_callback ( $m = FALSE ) { $s = preg_replace ( "/http\:\/\//i" , "https://" , $m [ 0 ] ) ; /* Conversion. */ /**/ if (_ws_plugin__s2member_force_ssl_port && _ws_plugin__s2member_force_ssl_host && _ws_plugin__s2member_force_ssl_host_port) /* Need port conversions? */ $s = preg_replace ( "/\/" . preg_quote (_ws_plugin__s2member_force_ssl_host, "/" ) . "(\:[0-9]+)?\//i" , "/" . _ws_plugin__s2member_force_ssl_host_port . "/" , $s ) ; /**/ $s = ( strtolower ( $m [ 1 ] ) === "link" && preg_match ( "/['\"]alternate['\"]/i" , $m [ 0 ] ) ) ? $m [ 0 ] : $s ; /* Alternates are fine to leave like they are. */ /**/ return $s ; /* Return string with conversions. */ } } /**/ if ( ! function_exists ( "_ws_plugin__s2member_force_non_ssl_buffer_callback" ) ) { function _ws_plugin__s2member_force_non_ssl_buffer_callback ( $m = FALSE ) { $s = preg_replace ( "/https\:\/\/" . preg_quote (_ws_plugin__s2member_force_ssl_host_port, "/" ) . "/i" , "http://" . _ws_plugin__s2member_force_ssl_host, $m [ 0 ] ) ; /**/ $s = preg_replace ( "/https\:\/\/" . preg_quote (_ws_plugin__s2member_force_ssl_host, "/" ) . "/i" , "http://" . _ws_plugin__s2member_force_ssl_host, $s ) ; /* Data gets converted to prevent a site-wide conversion over to SSL links. */ return $s ; /* Return string with conversions. */ } } /**/ if ( ! function_exists ( "_ws_plugin__s2member_force_non_ssl_scheme" ) ) { function _ws_plugin__s2member_force_non_ssl_scheme ( $url = FALSE , $path = FALSE , $scheme = FALSE ) { if ( ! in_array ( $scheme , array ( "http" , "https" ) ) ) /* If NOT explicitly passed through. */ { /* Allows for special exceptions to the rule of always forcing a non-SSL scheme. */ if ( ( $scheme === "login_post" || $scheme === "rpc" ) && ( force_ssl_login ( ) || force_ssl_admin ( ) ) ) $scheme = "https" ; else if ( $scheme === "login" && force_ssl_admin ( ) ) $scheme = "https" ; else if ( $scheme === "admin" && force_ssl_admin ( ) ) $scheme = "https" ; else /* Defaults to http. */ $scheme = "http" ; } /**/ $scheme = apply_filters ( "_ws_plugin__s2member_force_non_ssl_scheme" , $scheme , get_defined_vars ( ) ) ; /**/ return preg_replace ( "/^http(s)?\:\/\//i" , $scheme . "://" , $url ) ; } } /**/ ob_start ( "_ws_plugin__s2member_force_ssl_buffer" ) ; } /**/ return ; /* Return for uniformity. */ } } } ? [ full view ]s2member\includes\classes\ssl-in.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:14 pm


]]>
2011-07-11T17:29:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=27738#p27738 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: July 11, 2011, 6:29 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\ssl-in.inc.php ?php /** * SSL routines ( inner processing routines ). * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\SSL * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_ssl_in" ) ) { /** * SSL routines ( inner processing routines ). * * @package s2Member\SSL * @since 3.5 */ class c_ws_plugin__s2member_ssl_in { /** * Forces SSL on specific Posts/Pages, or any page for that matter. * * Triggered by Custom Field: `s2member_force_ssl = yes|port#` * * Triggered by: `?s2-ssl` or `?s2-ssl=yes|port#`. * * @package s2Member\SSL * @since 3.5 * * @attaches-to: ``add_action("init");`` * @attaches-to: ``add_action("template_redirect");`` * * @return null Possibly exiting script execution after redirection to SSL variation. */ public static function force_ssl ( $vars = array ( ) ) /* Phase 2 of ``c_ws_plugin__s2member_ssl::check_force_ssl()``. */ { extract ( $vars ) ; /* Extract all vars passed in from: ``c_ws_plugin__s2member_ssl::check_force_ssl()``. */ /**/ $force_ssl = ( ! is_string ( $force_ssl ) ) ? (string) (int) $force_ssl : $force_ssl ; /* Force string. */ $force_ssl = ( is_numeric ( $force_ssl ) && $force_ssl 1 ) ? $force_ssl : "yes" ; /* Use `yes`. */ /**/ $ssl_host = preg_replace ( "/\:[0-9]+$/" , "" , $_SERVER [ "HTTP_HOST" ] ) ; /* Remove port here. */ $ssl_port = ( is_numeric ( $force_ssl ) && $force_ssl 1 ) ? $force_ssl : false ; /* Port? */ $ssl_host_port = $ssl_host . ( ( $ssl_port ) ? ":" . $ssl_port : "" ) ; /* Use port # ? */ /**/ if ( ! is_ssl ( ) || ! isset ( $_GET [ $s2_ssl_gv ] ) ) /* SSL must be enabled. */ { $https = "https://" . $ssl_host_port . $_SERVER [ "REQUEST_URI" ] ; $https_with_s2_ssl_gv = add_query_arg ( $s2_ssl_gv , urlencode ( $force_ssl ) , $https ) ; /**/ wp_redirect ( $https_with_s2_ssl_gv ) ; /* Redirect to https. */ exit ( ) ; /* Clean exit. */ } else /* Otherwise, we buffer all output, and switch all content over to https. */ /* Also, we assume here that other links on the site should NOT be converted to https. */ { add_filter ( "redirect_canonical" , "__return_false" ) ; /**/ define ( "_ws_plugin__s2member_force_ssl_host" , $ssl_host ) ; define ( "_ws_plugin__s2member_force_ssl_port" , $ssl_port ) ; define ( "_ws_plugin__s2member_force_ssl_host_port" , $ssl_host_port ) ; /**/ /* Filter these. We do NOT want to create a sitewide https conversion! */ add_filter ( "home_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 3 ) ; add_filter ( "network_home_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 3 ) ; add_filter ( "site_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 3 ) ; add_filter ( "network_site_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 3 ) ; /* These additional URLs are NOT Filtered by default; but can be if needed. Use these Filters. */ if ( apply_filters ( "_ws_plugin__s2member_force_non_ssl_scheme_plugins_url" , false , get_defined_vars ( ) ) ) add_filter ( "plugins_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 2 ) ; /* These additional URLs are NOT Filtered by default; but can be if needed. Use these Filters. */ if ( apply_filters ( "_ws_plugin__s2member_force_non_ssl_scheme_content_url" , false , get_defined_vars ( ) ) ) add_filter ( "content_url" , "_ws_plugin__s2member_force_non_ssl_scheme" , 10 , 2 ) ; /**/ if ( ! function_exists ( "_ws_plugin__s2member_force_ssl_buffer" ) ) { function _ws_plugin__s2member_force_ssl_buffer ( $buffer = FALSE ) { $o_pcre = @ ini_get ( "pcre.backtrack_limit" ) ; /* Current configuration. */ /**/ @ ini_set ( "pcre.backtrack_limit" , 10000000 ) ; /* Expands abilities for this routine. */ /**/ $ssl_tags = array ( "script" , "style" , "link" , "img" , "input" , "iframe" , "object" , "embed" ) ; $ssl_tags = apply_filters ( "_ws_plugin__s2member_force_ssl_buffer_tags_array" , $ssl_tags , get_defined_vars ( ) ) ; $ssl_tags = array_unique ( array_map ( "strtolower" , $ssl_tags ) ) ; /* This array should be lowercase / unique. */ /**/ $ssl_regex_tags = implode ( "|" , array_map ( "preg_quote" , $ssl_tags ) ) ; /* Prepare for regex. */ /**/ $buffer = ( $ssl_regex_tags ) ? preg_replace_callback ( "/\(" . $ssl_regex_tags . ")(?![a-z_0-9\-])[^\]+\/i" , "_ws_plugin__s2member_force_ssl_buffer_callback" , $buffer ) : $buffer ; $buffer = ( in_array ( "object" , $ssl_tags ) ) ? preg_replace_callback ( "/\object(?![a-z_0-9\-])[^\]*\.*?\\/object\/is" , "_ws_plugin__s2member_force_ssl_buffer_callback" , $buffer ) : $buffer ; $buffer = ( in_array ( "script" , $ssl_tags ) ) ? preg_replace_callback ( "/\script(?![a-z_0-9\-])[^\]*\.*?\\/script\/is" , "_ws_plugin__s2member_force_ssl_buffer_callback" , $buffer ) : $buffer ; $buffer = ( in_array ( "style" , $ssl_tags ) ) ? preg_replace_callback ( "/\style(?![a-z_0-9\-])[^\]*\.*?\\/style\/is" , "_ws_plugin__s2member_force_ssl_buffer_callback" , $buffer ) : $buffer ; /**/ $non_ssl_tags = array ( "a" ) ; /* Tags that should NOT contain SSL-enabled links in them. Prevents site-wide conversions */ $non_ssl_tags = apply_filters ( "_ws_plugin__s2member_force_non_ssl_buffer_tags_array" , $non_ssl_tags , get_defined_vars ( ) ) ; $non_ssl_tags = array_unique ( array_map ( "strtolower" , $non_ssl_tags ) ) ; /* This array should be lowercase / unique. */ /**/ $non_ssl_regex_tags = implode ( "|" , array_map ( "preg_quote" , $non_ssl_tags ) ) ; /* Prepare for regex. */ /**/ $buffer = ( $non_ssl_regex_tags ) ? preg_replace_callback ( "/\(" . $non_ssl_regex_tags . ")(?![a-z_0-9\-])[^\]+\/i" , "_ws_plugin__s2member_force_non_ssl_buffer_callback" , $buffer ) : $buffer ; /**/ @ ini_set ( "pcre.backtrack_limit" , $o_pcre ) ; /* Restores previous configuration value now. */ /**/ return apply_filters ( "_ws_plugin__s2member_force_ssl_buffer" , $buffer , get_defined_vars ( ) ) ; } } /**/ if ( ! function_exists ( "_ws_plugin__s2member_force_ssl_buffer_callback" ) ) { function _ws_plugin__s2member_force_ssl_buffer_callback ( $m = FALSE ) { $s = preg_replace ( "/http\:\/\//i" , "https://" , $m [ 0 ] ) ; /* Conversion. */ /**/ if (_ws_plugin__s2member_force_ssl_port && _ws_plugin__s2member_force_ssl_host && _ws_plugin__s2member_force_ssl_host_port) /* Need port conversions? */ $s = preg_replace ( "/\/" . preg_quote (_ws_plugin__s2member_force_ssl_host, "/" ) . "(\:[0-9]+)?\//i" , "/" . _ws_plugin__s2member_force_ssl_host_port . "/" , $s ) ; /**/ $s = ( strtolower ( $m [ 1 ] ) === "link" && preg_match ( "/['\"]alternate['\"]/i" , $m [ 0 ] ) ) ? $m [ 0 ] : $s ; /* Alternates are fine to leave like they are. */ /**/ return $s ; /* Return string with conversions. */ } } /**/ if ( ! function_exists ( "_ws_plugin__s2member_force_non_ssl_buffer_callback" ) ) { function _ws_plugin__s2member_force_non_ssl_buffer_callback ( $m = FALSE ) { $s = preg_replace ( "/https\:\/\/" . preg_quote (_ws_plugin__s2member_force_ssl_host_port, "/" ) . "/i" , "http://" . _ws_plugin__s2member_force_ssl_host, $m [ 0 ] ) ; /**/ $s = preg_replace ( "/https\:\/\/" . preg_quote (_ws_plugin__s2member_force_ssl_host, "/" ) . "/i" , "http://" . _ws_plugin__s2member_force_ssl_host, $s ) ; /* Data gets converted to prevent a site-wide conversion over to SSL links. */ return $s ; /* Return string with conversions. */ } } /**/ if ( ! function_exists ( "_ws_plugin__s2member_force_non_ssl_scheme" ) ) { function _ws_plugin__s2member_force_non_ssl_scheme ( $url = FALSE , $path = FALSE , $scheme = FALSE ) { if ( ! in_array ( $scheme , array ( "http" , "https" ) ) ) /* If NOT explicitly passed through. */ { /* Allows for special exceptions to the rule of always forcing a non-SSL scheme. */ if ( ( $scheme === "login_post" || $scheme === "rpc" ) && ( force_ssl_login ( ) || force_ssl_admin ( ) ) ) $scheme = "https" ; else if ( $scheme === "login" && force_ssl_admin ( ) ) $scheme = "https" ; else if ( $scheme === "admin" && force_ssl_admin ( ) ) $scheme = "https" ; else /* Defaults to http. */ $scheme = "http" ; } /**/ $scheme = apply_filters ( "_ws_plugin__s2member_force_non_ssl_scheme" , $scheme , get_defined_vars ( ) ) ; /**/ return preg_replace ( "/^http(s)?\:\/\//i" , $scheme . "://" , $url ) ; } } /**/ ob_start ( "_ws_plugin__s2member_force_ssl_buffer" ) ; } /**/ return ; /* Return for uniformity. */ } } } ? [ full view ]s2member\includes\classes\ssl-in.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:29 pm


]]>
2011-07-09T06:09:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13075&p=25370#p25370 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\ssl-in.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:09 am


]]>