HTTP / HTTPS Remover: SSL Mixed Content Fix - Version 3.2.3

Version Description

  • Adjusted PHP compatibility
  • Tested with WP 6.1.1
Download this release

Release Info

Developer iclyde
Plugin Icon 128x128 HTTP / HTTPS Remover: SSL Mixed Content Fix
Version 3.2.3
Comparing to
See all releases

Code changes from version 3.2.2 to 3.2.3

analyst/main.php CHANGED
@@ -15,7 +15,7 @@ if (!function_exists('analyst_init')) {
15
  try {
16
  analyst_resolve_sdk($options['base-dir']);
17
  } catch (Exception $exception) {
18
- error_log('[ANALYST] Cannot resolve any supported SDK');
19
  return;
20
  }
21
 
@@ -30,7 +30,7 @@ if (!function_exists('analyst_init')) {
30
 
31
  $analyst->registerAccount(new Account\Account($options['client-id'], $options['client-secret'], $options['base-dir']));
32
  } catch (Exception $e) {
33
- error_log('Analyst SDK receive an error: [' . $e->getMessage() . '] Please contact our support at support@analyst.com');
34
  }
35
  }
36
  }
15
  try {
16
  analyst_resolve_sdk($options['base-dir']);
17
  } catch (Exception $exception) {
18
+ // error_log('[ANALYST] Cannot resolve any supported SDK');
19
  return;
20
  }
21
 
30
 
31
  $analyst->registerAccount(new Account\Account($options['client-id'], $options['client-secret'], $options['base-dir']));
32
  } catch (Exception $e) {
33
+ // error_log('Analyst SDK receive an error: [' . $e->getMessage() . '] Please contact our support at support@analyst.com');
34
  }
35
  }
36
  }
analyst/src/Account/Account.php CHANGED
@@ -243,17 +243,12 @@ class Account implements TrackerContract
243
  {
244
  if (!$this->isAllowingLogging()) return;
245
 
246
- $question = isset($_POST['question']) ? stripslashes($_POST['question']) : null;
247
- $reason = isset($_POST['reason']) ? stripslashes($_POST['reason']) : null;
248
 
249
- $response = DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
250
  ->execute($this->requestor);
251
 
252
- // Exit if request failed
253
- if (!$response->isSuccess()) {
254
- wp_send_json_error($response->body);
255
- }
256
-
257
  $this->setIsInstalled(false);
258
 
259
  AccountDataFactory::syncData();
@@ -268,12 +263,7 @@ class Account implements TrackerContract
268
  */
269
  public function onOptInListener()
270
  {
271
- $response = OptInRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
272
-
273
- // Exit if request failed
274
- if (!$response->isSuccess()) {
275
- wp_send_json_error($response->body);
276
- }
277
 
278
  $this->setIsOptedIn(true);
279
 
@@ -289,12 +279,7 @@ class Account implements TrackerContract
289
  */
290
  public function onOptOutListener()
291
  {
292
- $response = OptOutRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
293
-
294
- // Exit if request failed
295
- if (!$response->isSuccess()) {
296
- wp_send_json_error($response->body);
297
- }
298
 
299
  $this->setIsOptedIn(false);
300
 
@@ -318,12 +303,7 @@ class Account implements TrackerContract
318
  $this->setIsInstallResolved(true);
319
  $cache->delete('plugin_to_install');
320
 
321
- $response = InstallRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
322
-
323
- // Exit if request failed
324
- if (!$response->isSuccess()) {
325
- wp_send_json_error($response->body);
326
- }
327
 
328
  $this->setIsSigned(true);
329
 
243
  {
244
  if (!$this->isAllowingLogging()) return;
245
 
246
+ $question = isset($_POST['question']) ? sanitize_text_field(stripslashes($_POST['question'])) : null;
247
+ $reason = isset($_POST['reason']) ? sanitize_text_field(stripslashes($_POST['reason'])) : null;
248
 
249
+ DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
250
  ->execute($this->requestor);
251
 
 
 
 
 
 
252
  $this->setIsInstalled(false);
253
 
254
  AccountDataFactory::syncData();
263
  */
264
  public function onOptInListener()
265
  {
266
+ OptInRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
 
 
 
 
 
267
 
268
  $this->setIsOptedIn(true);
269
 
279
  */
280
  public function onOptOutListener()
281
  {
282
+ OptOutRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
 
 
 
 
 
283
 
284
  $this->setIsOptedIn(false);
285
 
303
  $this->setIsInstallResolved(true);
304
  $cache->delete('plugin_to_install');
305
 
306
+ InstallRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
 
 
 
 
 
307
 
308
  $this->setIsSigned(true);
309
 
analyst/src/Collector.php CHANGED
@@ -153,7 +153,7 @@ class Collector
153
  */
154
  public function getServerIp()
155
  {
156
- return $_SERVER['SERVER_ADDR'];
157
  }
158
 
159
  /**
153
  */
154
  public function getServerIp()
155
  {
156
+ return sanitize_text_field($_SERVER['SERVER_ADDR']);
157
  }
158
 
159
  /**
analyst/src/Core/AbstractFactory.php CHANGED
@@ -12,7 +12,7 @@ abstract class AbstractFactory
12
  */
13
  protected static function unserialize($raw)
14
  {
15
- $instance = @unserialize($raw);
16
 
17
  $isProperObject = is_object($instance) && $instance instanceof static;
18
 
12
  */
13
  protected static function unserialize($raw)
14
  {
15
+ $instance = maybe_unserialize($raw);
16
 
17
  $isProperObject = is_object($instance) && $instance instanceof static;
18
 
analyst/src/Mutator.php CHANGED
@@ -60,10 +60,10 @@ class Mutator
60
 
61
  analyst_require_template('optin.php');
62
 
63
- analyst_require_template('forms/deactivate.php', [
64
- 'pencilImage' => analyst_assets_url('img/pencil.png'),
65
- 'smileImage' => analyst_assets_url('img/smile.png'),
66
- ]);
67
 
68
  analyst_require_template('forms/install.php', [
69
  'pluginToInstall' => $this->cache->get('plugin_to_install'),
@@ -95,7 +95,7 @@ class Mutator
95
  public function registerHooks()
96
  {
97
  add_action('wp_ajax_analyst_notification_dismiss', function () {
98
- $this->factory->remove($_POST['id']);
99
 
100
  $this->factory->sync();
101
  });
60
 
61
  analyst_require_template('optin.php');
62
 
63
+ // analyst_require_template('forms/deactivate.php', [
64
+ // 'pencilImage' => analyst_assets_url('img/pencil.png'),
65
+ // 'smileImage' => analyst_assets_url('img/smile.png'),
66
+ // ]);
67
 
68
  analyst_require_template('forms/install.php', [
69
  'pluginToInstall' => $this->cache->get('plugin_to_install'),
95
  public function registerHooks()
96
  {
97
  add_action('wp_ajax_analyst_notification_dismiss', function () {
98
+ $this->factory->remove(sanitize_text_field($_POST['id']));
99
 
100
  $this->factory->sync();
101
  });
analyst/src/helpers.php CHANGED
@@ -71,14 +71,3 @@ if (! function_exists('analyst_require_template')) {
71
  require analyst_templates_path($file);
72
  }
73
  }
74
-
75
- if (! function_exists('dd')) {
76
- /**
77
- * Dump some data
78
- */
79
- function dd ()
80
- {
81
- var_dump(func_get_args());
82
- die();
83
- }
84
- }
71
  require analyst_templates_path($file);
72
  }
73
  }
 
 
 
 
 
 
 
 
 
 
 
analyst/templates/forms/deactivate.php CHANGED
@@ -3,12 +3,12 @@
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-deactivate-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block" style="width: 80px">
6
- <img src="<?=$pencilImage?>"/>
7
  </div>
8
  <div class="analyst-install-description-block" style="padding-left: 20px">
9
  <strong class="analyst-modal-header">Why do you deactivate?</strong>
10
  <div class="analyst-install-description-text" style="padding-top: 2px">
11
- Please let us know, so we can improve it! Thank you <img class="analyst-smile-image" src="<?=$smileImage?>" alt="">
12
  </div>
13
  </div>
14
  </div>
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-deactivate-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block" style="width: 80px">
6
+ <img src="<?php echo $pencilImage; ?>"/>
7
  </div>
8
  <div class="analyst-install-description-block" style="padding-left: 20px">
9
  <strong class="analyst-modal-header">Why do you deactivate?</strong>
10
  <div class="analyst-install-description-text" style="padding-top: 2px">
11
+ Please let us know, so we can improve it! Thank you <img class="analyst-smile-image" src="<?php echo $smileImage; ?>" alt="">
12
  </div>
13
  </div>
14
  </div>
analyst/templates/forms/install.php CHANGED
@@ -1,20 +1,20 @@
1
- <div id="analyst-install-modal" class="analyst-modal" style="display: none" analyst-plugin-id="<?=$pluginToInstall?>">
2
  <div class="analyst-modal-content" style="width: 450px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-install-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block">
6
- <img src="<?=$shieldImage?>"/>
7
  </div>
8
  <div class="analyst-install-description-block">
9
  <strong class="analyst-modal-header">Stay on the safe side</strong>
10
  <p class="analyst-install-description-text">Receive our plugin’s alerts in
11
- case of <strong>critical security</strong> & feature
12
  updates and allow non-sensitive
13
  diagnostic tracking.</p>
14
  </div>
15
  </div>
16
  <div class="analyst-modal-def-top-padding">
17
- <button class="analyst-btn-success" id="analyst-install-action">Allow & Continue ></button>
18
  </div>
19
  <div class="analyst-modal-def-top-padding" id="analyst-permissions-block" style="display: none">
20
  <span>You’re granting these permissions:</span>
1
+ <div id="analyst-install-modal" class="analyst-modal" style="display: none" analyst-plugin-id="<?php echo $pluginToInstall; ?>">
2
  <div class="analyst-modal-content" style="width: 450px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-install-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block">
6
+ <img src="<?php echo $shieldImage; ?>"/>
7
  </div>
8
  <div class="analyst-install-description-block">
9
  <strong class="analyst-modal-header">Stay on the safe side</strong>
10
  <p class="analyst-install-description-text">Receive our plugin’s alerts in
11
+ case of <strong>critical security</strong>, feature & special deal
12
  updates and allow non-sensitive
13
  diagnostic tracking.</p>
14
  </div>
15
  </div>
16
  <div class="analyst-modal-def-top-padding">
17
+ <button class="analyst-btn-success" id="analyst-install-action">Allow & Continue &gt;</button>
18
  </div>
19
  <div class="analyst-modal-def-top-padding" id="analyst-permissions-block" style="display: none">
20
  <span>You’re granting these permissions:</span>
analyst/templates/notice.php CHANGED
@@ -1,10 +1,10 @@
1
  <div class="notice notice-success analyst-notice">
2
  <p>
3
- <strong class="analyst-plugin-name"><?=$notice->getPluginName()?></strong>
4
- <?=$notice->getBody()?>
5
  </p>
6
 
7
- <button type="button" class="analyst-notice-dismiss notice-dismiss" analyst-notice-id="<?=$notice->getId()?>">
8
  <span class="screen-reader-text">Dismiss this notice.</span>
9
  </button>
10
  </div>
1
  <div class="notice notice-success analyst-notice">
2
  <p>
3
+ <strong class="analyst-plugin-name"><?php echo $notice->getPluginName(); ?></strong>
4
+ <?php echo $notice->getBody(); ?>
5
  </p>
6
 
7
+ <button type="button" class="analyst-notice-dismiss notice-dismiss" analyst-notice-id="<?php echo $notice->getId(); ?>">
8
  <span class="screen-reader-text">Dismiss this notice.</span>
9
  </button>
10
  </div>
analyst/templates/optout.php CHANGED
@@ -3,7 +3,7 @@
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-opt-out-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block" style="width: 120px">
6
- <img src="<?=$shieldImage?>"/>
7
  </div>
8
  <div class="analyst-install-description-block">
9
  <strong class="analyst-modal-header">By opting out, we cannot alert you anymore in case of important security updates.</strong>
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-opt-out-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block" style="width: 120px">
6
+ <img src="<?php echo $shieldImage; ?>"/>
7
  </div>
8
  <div class="analyst-install-description-block">
9
  <strong class="analyst-modal-header">By opting out, we cannot alert you anymore in case of important security updates.</strong>
analyst/version.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  return array(
4
  // The sdk version
5
- 'sdk' => '1.3.28',
6
 
7
  // Minimum supported WordPress version
8
  'wp' => '4.7',
2
 
3
  return array(
4
  // The sdk version
5
+ 'sdk' => '1.3.30',
6
 
7
  // Minimum supported WordPress version
8
  'wp' => '4.7',
http-https-remover.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: HTTP / HTTPS Removal
4
  * Plugin URI: https://wordpress.org/plugins/http-https-Removal/
5
  * Description: This Plugin creates protocol relative urls by removing http + https from links.
6
- * Version: 3.2.2
7
  * Author: Steve85b
8
  * Author URI: https://inisev.com
9
  * License: GPLv3
3
  * Plugin Name: HTTP / HTTPS Removal
4
  * Plugin URI: https://wordpress.org/plugins/http-https-Removal/
5
  * Description: This Plugin creates protocol relative urls by removing http + https from links.
6
+ * Version: 3.2.3
7
  * Author: Steve85b
8
  * Author URI: https://inisev.com
9
  * License: GPLv3
readme.txt CHANGED
@@ -2,16 +2,16 @@
2
  Contributors: Steve85b
3
  Tags: SSL, https, force SSL, mixed content, insecure content, secure website, website security, TLS, security, secure socket layers, HSTS
4
  Requires at least: 4.6
5
- Tested up to: 6.1
6
- Stable tag: 3.2.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
10
  A fix for mixed content! This Plugin creates protocol relative urls by removing http + https from links. Works in Front- and Backend!
11
 
12
  == Description ==
13
-
14
- **To see a demo of the plugin in action please click here: [https://tastewp.com/new/?pre-installed-plugin-slug=http-https-remover](https://tastewp.com/new/?pre-installed-plugin-slug=http-https-remover)**
15
 
16
  UPDATE: This plugin will be maintained again! It changed ownership and we're currently collecting ideas how to further improve it. If you have any cool ideas, please let us know in Support Forum. Thank you!
17
 
@@ -97,6 +97,11 @@ Change all your CDN references to load with // (this will adapt based on how the
97
  1. The Sourcecode of the Website will look like this!
98
 
99
  == Changelog ==
 
 
 
 
 
100
  = 3.2.2 =
101
  * Added support for PHP 8
102
  * Fixed activation issues on PHP 8 and 8.1
@@ -269,11 +274,6 @@ Change all your CDN references to load with // (this will adapt based on how the
269
  * Initial release
270
 
271
  == Upgrade Notice ==
272
- = 3.2.2 =
273
- * Added support for PHP 8
274
- * Fixed activation issues on PHP 8 and 8.1
275
- * Tested up to WordPress 6.1-RC5
276
- * Fixed issues with option saving
277
- * Resolved errors of missing options
278
- * Added new option for enable/disable plugin testing module
279
- * Updated carrousel banner
2
  Contributors: Steve85b
3
  Tags: SSL, https, force SSL, mixed content, insecure content, secure website, website security, TLS, security, secure socket layers, HSTS
4
  Requires at least: 4.6
5
+ Tested up to: 6.1.1
6
+ Stable tag: 3.2.3
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
10
  A fix for mixed content! This Plugin creates protocol relative urls by removing http + https from links. Works in Front- and Backend!
11
 
12
  == Description ==
13
+ **Try it out on your free dummy site: Click here => [https://tastewp.com/plugins/http-https-remover](https://tastewp.com/plugins/http-https-remover).**
14
+ (this trick works for all plugins in the WP repo - just replace "wordpress" with "tastewp" in the URL)
15
 
16
  UPDATE: This plugin will be maintained again! It changed ownership and we're currently collecting ideas how to further improve it. If you have any cool ideas, please let us know in Support Forum. Thank you!
17
 
97
  1. The Sourcecode of the Website will look like this!
98
 
99
  == Changelog ==
100
+
101
+ = 3.2.3 =
102
+ * Adjusted PHP compatibility
103
+ * Tested with WP 6.1.1
104
+
105
  = 3.2.2 =
106
  * Added support for PHP 8
107
  * Fixed activation issues on PHP 8 and 8.1
274
  * Initial release
275
 
276
  == Upgrade Notice ==
277
+ = 3.2.3 =
278
+ * Adjusted PHP compatibility
279
+ * Tested with WP 6.1.1