Unbounce Landing Pages - Version 1.0.42

Version Description

  • Fixes an issue causing older versions of PHP to get a 404 when visiting pages
  • Updated diagnostics and matching documentation to require PHP 5.6 or higher
Download this release

Release Info

Developer unbouncewordpress
Plugin Icon Unbounce Landing Pages
Version 1.0.42
Comparing to
See all releases

Code changes from version 1.0.41 to 1.0.42

UBConfig.php CHANGED
@@ -5,8 +5,8 @@ class UBConfig
5
 
6
  const UB_PLUGIN_NAME = 'ub-wordpress';
7
  const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP';
8
- const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.41';
9
- const UB_VERSION = '1.0.41';
10
 
11
  // Option keys
12
  const UB_ROUTES_CACHE_KEY = 'ub-route-cache';
5
 
6
  const UB_PLUGIN_NAME = 'ub-wordpress';
7
  const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP';
8
+ const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.42';
9
+ const UB_VERSION = '1.0.42';
10
 
11
  // Option keys
12
  const UB_ROUTES_CACHE_KEY = 'ub-route-cache';
UBDiagnostics.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class UBDiagnostics
4
  {
5
- const SUPPORTED_PHP_VERSION = '5.3';
6
  const SUPPORTED_WP_VERSION = '4.0';
7
 
8
  public static function checks($domain, $domain_info)
@@ -100,7 +100,7 @@ class UBDiagnostics
100
  return array(
101
  'PHP Version' => phpversion(),
102
  'WordPress Version' => UBDiagnostics::wordpress_version(),
103
- 'Unbounce Plugin Version' => '1.0.41',
104
  'Checks' => self::pp(UBDiagnostics::checks($domain, $domain_info)),
105
  'Options' => self::pp(UBDiagnostics::ub_options()),
106
  'Permalink Structure' => get_option('permalink_structure', ''),
@@ -178,7 +178,7 @@ class UBDiagnostics
178
  return array(
179
  'php' => phpversion(),
180
  'wordpress' => UBDiagnostics::wordpress_version(),
181
- 'plugin_version' => '1.0.41',
182
  'curl_installed' => self::is_curl_installed(),
183
  'xml_installed' => self::is_xml_installed(),
184
  'sni_support' => self::hasSNI(),
2
 
3
  class UBDiagnostics
4
  {
5
+ const SUPPORTED_PHP_VERSION = '5.6';
6
  const SUPPORTED_WP_VERSION = '4.0';
7
 
8
  public static function checks($domain, $domain_info)
100
  return array(
101
  'PHP Version' => phpversion(),
102
  'WordPress Version' => UBDiagnostics::wordpress_version(),
103
+ 'Unbounce Plugin Version' => '1.0.42',
104
  'Checks' => self::pp(UBDiagnostics::checks($domain, $domain_info)),
105
  'Options' => self::pp(UBDiagnostics::ub_options()),
106
  'Permalink Structure' => get_option('permalink_structure', ''),
178
  return array(
179
  'php' => phpversion(),
180
  'wordpress' => UBDiagnostics::wordpress_version(),
181
+ 'plugin_version' => '1.0.42',
182
  'curl_installed' => self::is_curl_installed(),
183
  'xml_installed' => self::is_xml_installed(),
184
  'sni_support' => self::hasSNI(),
UBHTTP.php CHANGED
@@ -227,9 +227,13 @@ class UBHTTP
227
  $forwarded_for = UBUtil::array_fetch($_SERVER, 'HTTP_X_FORWARDED_FOR');
228
  $remote_ip = UBUtil::array_fetch($_SERVER, 'REMOTE_ADDR');
229
 
230
- $filtered_h = array_filter($base_h, function ($value, $key) {
231
- return !preg_match(UBHTTP::$request_header_blacklist, $key . ": " . $value);
232
- }, ARRAY_FILTER_USE_BOTH);
 
 
 
 
233
  $filtered_h = UBHTTP::sanitize_cookies($filtered_h);
234
 
235
  $filtered_h = array_merge($filtered_h, UBHTTP::get_proxied_for_header(
@@ -245,7 +249,9 @@ class UBHTTP
245
  UBHTTP::cookie_array_from_string($headers["Cookie"]),
246
  UBHTTP::$cookie_whitelist
247
  );
248
- $headers["Cookie"] = UBHTTP::cookie_string_from_array($cookies_to_forward);
 
 
249
  return $headers;
250
  }
251
 
227
  $forwarded_for = UBUtil::array_fetch($_SERVER, 'HTTP_X_FORWARDED_FOR');
228
  $remote_ip = UBUtil::array_fetch($_SERVER, 'REMOTE_ADDR');
229
 
230
+ $filtered_h = array();
231
+ array_walk($base_h, function ($v, $k) use (&$filtered_h) {
232
+ if (!preg_match(UBHTTP::$request_header_blacklist, $k . ": " . $v)) {
233
+ $filtered_h[$k] = $v;
234
+ }
235
+ });
236
+
237
  $filtered_h = UBHTTP::sanitize_cookies($filtered_h);
238
 
239
  $filtered_h = array_merge($filtered_h, UBHTTP::get_proxied_for_header(
249
  UBHTTP::cookie_array_from_string($headers["Cookie"]),
250
  UBHTTP::$cookie_whitelist
251
  );
252
+ if (sizeof($cookies_to_forward) > 0) {
253
+ $headers["Cookie"] = UBHTTP::cookie_string_from_array($cookies_to_forward);
254
+ }
255
  return $headers;
256
  }
257
 
Unbounce-Page.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Unbounce Landing Pages
4
  Plugin URI: http://unbounce.com
5
  Description: Unbounce is the most powerful standalone landing page builder available.
6
- Version: 1.0.41
7
  Author: Unbounce
8
  Author URI: http://unbounce.com
9
  License: GPLv2
3
  Plugin Name: Unbounce Landing Pages
4
  Plugin URI: http://unbounce.com
5
  Description: Unbounce is the most powerful standalone landing page builder available.
6
+ Version: 1.0.42
7
  Author: Unbounce
8
  Author URI: http://unbounce.com
9
  License: GPLv2
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: unbouncewordpress
3
  Tags: Unbounce, AB testing, A/B testing, split testing, CRO, conversion optimization, wordpress landing page, wp landing pages, splash pages, landing pages, squeeze pages, lead gen, lead generation, email list, responsive landing pages, templates, inbound marketing, ppc, analytics
4
  Requires at least: 4.1.5
5
  Tested up to: 5.0
6
- Stable tag: 1.0.41
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -100,6 +100,10 @@ You should add a rule to your cache to avoid caching Unbounce Pages which have t
100
 
101
  == Changelog ==
102
 
 
 
 
 
103
  = 1.0.41 =
104
  * Fixed the issue in 1.0.39 that cause the API client ID to be defaulted to empty
105
 
3
  Tags: Unbounce, AB testing, A/B testing, split testing, CRO, conversion optimization, wordpress landing page, wp landing pages, splash pages, landing pages, squeeze pages, lead gen, lead generation, email list, responsive landing pages, templates, inbound marketing, ppc, analytics
4
  Requires at least: 4.1.5
5
  Tested up to: 5.0
6
+ Stable tag: 1.0.42
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
100
 
101
  == Changelog ==
102
 
103
+ = 1.0.42 =
104
+ * Fixes an issue causing older versions of PHP to get a 404 when visiting pages
105
+ * Updated diagnostics and matching documentation to require PHP 5.6 or higher
106
+
107
  = 1.0.41 =
108
  * Fixed the issue in 1.0.39 that cause the API client ID to be defaulted to empty
109
 
templates/diagnostics.php CHANGED
@@ -30,7 +30,7 @@ $permalink_structure = "<p>By default WordPress uses web URLs which have questio
30
 
31
  <p>Please update your <a href=\"{$permalink_url}\" target=\"_blank\">WordPress Permalink Structure</a> (link to: yourdomain.com/wp-admin/options-permalink) and change to anything other than the default WordPress setting.</p>";
32
 
33
- $supported_php_version = 'The Unbounce Pages plugin is supported when using PHP version 5.3 or higher, please contact your hosting provider or IT professional and update to a supported version.';
34
 
35
  $supported_wordpress_version = 'The Unbounce Pages plugin is supported on WordPress versions 4.0 and higher, please contact your hosting provider or IT professional and update to a supported version.';
36
 
30
 
31
  <p>Please update your <a href=\"{$permalink_url}\" target=\"_blank\">WordPress Permalink Structure</a> (link to: yourdomain.com/wp-admin/options-permalink) and change to anything other than the default WordPress setting.</p>";
32
 
33
+ $supported_php_version = 'The Unbounce Pages plugin is supported when using PHP version 5.6 or higher, please contact your hosting provider or IT professional and update to a supported version.';
34
 
35
  $supported_wordpress_version = 'The Unbounce Pages plugin is supported on WordPress versions 4.0 and higher, please contact your hosting provider or IT professional and update to a supported version.';
36
 
templates/main_authorized_footer.php CHANGED
@@ -21,4 +21,4 @@ $refresh_button = get_submit_button('refreshing the Published Pages list', 'seco
21
  <a class="ub-diagnostics-link" href="<?php echo $diagnostics_url ?>">
22
  Click here for troubleshooting and plugin diagnostics
23
  </a>
24
- <p class="ub-version">Unbounce Version 1.0.41</p>
21
  <a class="ub-diagnostics-link" href="<?php echo $diagnostics_url ?>">
22
  Click here for troubleshooting and plugin diagnostics
23
  </a>
24
+ <p class="ub-version">Unbounce Version 1.0.42</p>
templates/main_unauthorized_footer.php CHANGED
@@ -4,4 +4,4 @@
4
  <a class="ub-diagnostics-link" href="<?php echo admin_url('admin.php?page=unbounce-pages-diagnostics'); ?>">
5
  Click here for troubleshooting and plugin diagnostics
6
  </a>
7
- <p class="ub-version">Unbounce Version 1.0.41</p>
4
  <a class="ub-diagnostics-link" href="<?php echo admin_url('admin.php?page=unbounce-pages-diagnostics'); ?>">
5
  Click here for troubleshooting and plugin diagnostics
6
  </a>
7
+ <p class="ub-version">Unbounce Version 1.0.42</p>