WordPress HTTPS (SSL) - Version 3.3.6

Version Description

  • Fixed bug where admin links in multisite networks were being broken.
  • Added check for Jigoshop admin-ajax.php calls.
Download this release

Release Info

Developer Mvied
Plugin Icon wp plugin WordPress HTTPS (SSL)
Version 3.3.6
Comparing to
See all releases

Code changes from version 3.3.5 to 3.3.6

admin/js/metabox.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once(realpath(dirname(__FILE__) . '/../../../../..') . '/wp-load.php');
4
+
5
+ // Disable errors
6
+ error_reporting(0);
7
+
8
+ // Set headers
9
+ header("Status: 200");
10
+ header("HTTP/1.1 200 OK");
11
+ header('Content-Type: text/html');
12
+ header('Cache-Control: no-store, no-cache, must-revalidate');
13
+ header('Cache-Control: post-check=0, pre-check=0', FALSE);
14
+ header('Pragma: no-cache');
15
+ header("Vary: Accept-Encoding");
16
+
17
+ if ( ! wp_verify_nonce($_POST['_nonce'], 'wordpress-https') ) {
18
+ exit;
19
+ }
20
+
21
+ $content = WordPressHTTPS_Url::fromString( $_POST['url'] )->getContent();
22
+
23
+ if ( $content ) {
24
+ echo $content;
25
+ }
26
+ ?>
lib/WordPressHTTPS.php CHANGED
@@ -238,7 +238,7 @@ class WordPressHTTPS extends Mvied_Plugin {
238
  */
239
  public function isUrlLocal($url) {
240
  $hosts = $this->getLocalDomains();
241
- if ( ($url_parts = parse_url($url)) && isset($url_parts['host']) && !in_array($url_parts['host'], $hosts) ) {
242
  return false;
243
  }
244
  return true;
238
  */
239
  public function isUrlLocal($url) {
240
  $hosts = $this->getLocalDomains();
241
+ if ( ($url_parts = @parse_url($url)) && isset($url_parts['host']) && !in_array($url_parts['host'], $hosts) ) {
242
  return false;
243
  }
244
  return true;
lib/WordPressHTTPS/Module/Ecommerce.php CHANGED
@@ -71,7 +71,7 @@ class WordPressHTTPS_Module_Ecommerce extends Mvied_Plugin_Module {
71
  */
72
  public function secure_jigoshop( $force_ssl, $post_id = 0, $url = '' ) {
73
  if ( !is_admin() && $post_id > 0 ) {
74
- if ( get_option('jigoshop_force_ssl_checkout') === 'yes' && $post_id == get_option('jigoshop_checkout_page_id') ) {
75
  $force_ssl = true;
76
  }
77
  }
71
  */
72
  public function secure_jigoshop( $force_ssl, $post_id = 0, $url = '' ) {
73
  if ( !is_admin() && $post_id > 0 ) {
74
+ if ( get_option('jigoshop_force_ssl_checkout') === 'yes' && ( $post_id == get_option('jigoshop_checkout_page_id') || strpos($url, 'admin-ajax.php?action=jigoshop-checkout') !== false ) ) {
75
  $force_ssl = true;
76
  }
77
  }
lib/WordPressHTTPS/Module/Parser.php CHANGED
@@ -352,8 +352,10 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
352
  foreach( $url_path_segments as $url_path_segment ) {
353
  if ( is_null($blog_id) && $url_path_segment != '' ) {
354
  $url_path .= $url_path_segment . '/';
355
- if ( $blog_id = get_blog_id_from_url( $url_parts['host'], $url_path) ) {
356
  break;
 
 
357
  }
358
  }
359
  }
@@ -389,14 +391,17 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
389
  if ( is_null($blog_id) ) {
390
  $updated = $this->getPlugin()->makeUrlHttps($url);
391
  } else {
392
- if ( $ssl_host = $this->getPlugin()->getSetting('ssl_host', $blog_id) ) {
393
- if ( is_subdomain_install() ) {
394
- $host = $url_parts['host'] . '/';
395
- } else {
396
- $host = $url_parts['host'] . $url_path;
397
- }
398
- $updated = str_replace($url_parts['scheme'] . '://' . $host, $ssl_host, $url);
 
 
399
  }
 
400
  }
401
  $this->_html = str_replace($html, str_replace($url, $updated, $html), $this->_html);
402
  } else if ( !is_null($force_ssl) && !$force_ssl ) {
@@ -406,7 +411,7 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
406
  if ( is_subdomain_install() ) {
407
  $host = $url_parts['host'] . '/';
408
  } else {
409
- $host = $url_parts['host'] . $url_path;
410
  }
411
  $updated = str_replace($url_parts['scheme'] . '://' . $host, get_home_url($blog_id, '/'), $url);
412
  }
352
  foreach( $url_path_segments as $url_path_segment ) {
353
  if ( is_null($blog_id) && $url_path_segment != '' ) {
354
  $url_path .= $url_path_segment . '/';
355
+ if ( ($blog_id = get_blog_id_from_url( $url_parts['host'], $url_path)) > 0 ) {
356
  break;
357
+ } else {
358
+ $blog_id = null;
359
  }
360
  }
361
  }
391
  if ( is_null($blog_id) ) {
392
  $updated = $this->getPlugin()->makeUrlHttps($url);
393
  } else {
394
+ if ( $this->getPlugin()->getSetting('ssl_host', $blog_id) ) {
395
+ $ssl_host = $this->getPlugin()->getSetting('ssl_host', $blog_id);
396
+ } else {
397
+ $ssl_host = parse_url(get_home_url($blog_id, '/'), PHP_URL_HOST);
398
+ }
399
+ if ( is_subdomain_install() ) {
400
+ $host = $url_parts['host'] . '/';
401
+ } else {
402
+ $host = $url_parts['host'] . '/' . $url_path;
403
  }
404
+ $updated = str_replace($url_parts['scheme'] . '://' . $host, $ssl_host, $url);
405
  }
406
  $this->_html = str_replace($html, str_replace($url, $updated, $html), $this->_html);
407
  } else if ( !is_null($force_ssl) && !$force_ssl ) {
411
  if ( is_subdomain_install() ) {
412
  $host = $url_parts['host'] . '/';
413
  } else {
414
+ $host = $url_parts['host'] . '/' . $url_path;
415
  }
416
  $updated = str_replace($url_parts['scheme'] . '://' . $host, get_home_url($blog_id, '/'), $url);
417
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
5
  Requires at least: 3.0
6
  Tested up to: 3.5
7
- Stable tag: 3.3.5
8
  License: GPLv3
9
 
10
  WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
@@ -95,6 +95,9 @@ add_filter('force_ssl', 'store_force_ssl', 10, 3);`
95
  2. Force SSL checkbox added to add/edit posts screen
96
 
97
  == Changelog ==
 
 
 
98
  = 3.3.5 =
99
  * Enhanced multisite support and testing.
100
  * Slightly adjusted settings page column widths.
4
  Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
5
  Requires at least: 3.0
6
  Tested up to: 3.5
7
+ Stable tag: 3.3.6
8
  License: GPLv3
9
 
10
  WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
95
  2. Force SSL checkbox added to add/edit posts screen
96
 
97
  == Changelog ==
98
+ = 3.3.6 =
99
+ * Fixed bug where admin links in multisite networks were being broken.
100
+ * Added check for Jigoshop admin-ajax.php calls.
101
  = 3.3.5 =
102
  * Enhanced multisite support and testing.
103
  * Slightly adjusted settings page column widths.
wordpress-https.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://mvied.com/projects/wordpress-https/
5
  Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
6
  Author: Mike Ems
7
- Version: 3.3.5
8
  Author URI: http://mvied.com/
9
 
10
  Text Domain: wordpress-https
@@ -33,8 +33,14 @@ if ( !defined('ABSPATH') ) exit;
33
  load_plugin_textdomain( 'wordpress-https', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
34
 
35
  function wphttps_autoloader($class) {
36
- $filename = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php';
37
- @include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . $filename;
 
 
 
 
 
 
38
  }
39
  spl_autoload_register('wphttps_autoloader');
40
 
@@ -48,7 +54,7 @@ spl_autoload_register('wphttps_autoloader');
48
  if ( ! defined('WP_UNINSTALL_PLUGIN') ) {
49
  $wordpress_https = new WordPressHTTPS;
50
  $wordpress_https->setSlug('wordpress-https');
51
- $wordpress_https->setVersion('3.3.5');
52
  $wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
53
  $wordpress_https->setDirectory(dirname(__FILE__));
54
  $wordpress_https->setModuleDirectory(dirname(__FILE__) . '/lib/WordPressHTTPS/Module/');
4
  Plugin URI: http://mvied.com/projects/wordpress-https/
5
  Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
6
  Author: Mike Ems
7
+ Version: 3.3.6
8
  Author URI: http://mvied.com/
9
 
10
  Text Domain: wordpress-https
33
  load_plugin_textdomain( 'wordpress-https', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
34
 
35
  function wphttps_autoloader($class) {
36
+ $namespaces = array(
37
+ 'Mvied',
38
+ 'WordPressHTTPS'
39
+ );
40
+ if ( preg_match('/([A-Za-z]+)_?/', $class, $match) && in_array($match[1], $namespaces) ) {
41
+ $filename = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php';
42
+ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . $filename;
43
+ }
44
  }
45
  spl_autoload_register('wphttps_autoloader');
46
 
54
  if ( ! defined('WP_UNINSTALL_PLUGIN') ) {
55
  $wordpress_https = new WordPressHTTPS;
56
  $wordpress_https->setSlug('wordpress-https');
57
+ $wordpress_https->setVersion('3.3.6');
58
  $wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
59
  $wordpress_https->setDirectory(dirname(__FILE__));
60
  $wordpress_https->setModuleDirectory(dirname(__FILE__) . '/lib/WordPressHTTPS/Module/');