Version Description
- Add optional support for web servers with a load balancer or proxy that is on a different network
- This feature can be enabled with the ub-allow-public-address-x-forwarded-for option
- This feature may decrease the effectiveness of spam detection in some cases, and should only be enabled if absolutely necessary
Download this release
Release Info
Developer | unbouncewordpress |
Plugin | Unbounce Landing Pages |
Version | 1.0.23 |
Comparing to | |
See all releases |
Code changes from version 1.0.22 to 1.0.23
- UBConfig.php +7 -2
- UBDiagnostics.php +1 -1
- UBHTTP.php +3 -1
- Unbounce-Page.php +3 -2
- readme.txt +6 -1
- templates/main_authorized_footer.php +1 -1
- templates/main_unauthorized_footer.php +1 -1
UBConfig.php
CHANGED
@@ -4,8 +4,8 @@ class UBConfig {
|
|
4 |
|
5 |
const UB_PLUGIN_NAME = 'ub-wordpress';
|
6 |
const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP';
|
7 |
-
const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.
|
8 |
-
const UB_VERSION = '1.0.
|
9 |
|
10 |
// Option keys
|
11 |
const UB_ROUTES_CACHE_KEY = 'ub-route-cache';
|
@@ -21,6 +21,7 @@ class UBConfig {
|
|
21 |
const UB_DOMAIN_ID_KEY = 'ub-domain-id';
|
22 |
const UB_CLIENT_ID_KEY = 'ub-client-id';
|
23 |
const UB_PROXY_ERROR_MESSAGE_KEY = 'ub-proxy-error-message';
|
|
|
24 |
|
25 |
const UB_LOCK_NAME = 'ub-sql-lock';
|
26 |
|
@@ -116,6 +117,10 @@ class UBConfig {
|
|
116 |
return get_option(UBConfig::UB_REMOTE_DEBUG_KEY, 0) == 1;
|
117 |
}
|
118 |
|
|
|
|
|
|
|
|
|
119 |
public static function create_none_response() {
|
120 |
return array(array('status' => 'NONE'), null, null, null);
|
121 |
}
|
4 |
|
5 |
const UB_PLUGIN_NAME = 'ub-wordpress';
|
6 |
const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP';
|
7 |
+
const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.23';
|
8 |
+
const UB_VERSION = '1.0.23';
|
9 |
|
10 |
// Option keys
|
11 |
const UB_ROUTES_CACHE_KEY = 'ub-route-cache';
|
21 |
const UB_DOMAIN_ID_KEY = 'ub-domain-id';
|
22 |
const UB_CLIENT_ID_KEY = 'ub-client-id';
|
23 |
const UB_PROXY_ERROR_MESSAGE_KEY = 'ub-proxy-error-message';
|
24 |
+
const UB_ALLOW_PUBLIC_ADDRESS_X_FORWARDED_FOR = 'ub-allow-public-address-x-forwarded-for';
|
25 |
|
26 |
const UB_LOCK_NAME = 'ub-sql-lock';
|
27 |
|
117 |
return get_option(UBConfig::UB_REMOTE_DEBUG_KEY, 0) == 1;
|
118 |
}
|
119 |
|
120 |
+
public static function allow_public_address_x_forwarded_for() {
|
121 |
+
return get_option(UBConfig::UB_ALLOW_PUBLIC_ADDRESS_X_FORWARDED_FOR, 0) == 1;
|
122 |
+
}
|
123 |
+
|
124 |
public static function create_none_response() {
|
125 |
return array(array('status' => 'NONE'), null, null, null);
|
126 |
}
|
UBDiagnostics.php
CHANGED
@@ -28,7 +28,7 @@ class UBDiagnostics {
|
|
28 |
return array(
|
29 |
'PHP Version' => phpversion(),
|
30 |
'WordPress Version' => UBDiagnostics::wordpress_version(),
|
31 |
-
'Unbounce Plugin Version' => '1.0.
|
32 |
'Permalink Structure' => get_option('permalink_structure', ''),
|
33 |
'Domain' => $domain,
|
34 |
'Domain Authorized' => print_r(UBConfig::is_authorized_domain($domain), true),
|
28 |
return array(
|
29 |
'PHP Version' => phpversion(),
|
30 |
'WordPress Version' => UBDiagnostics::wordpress_version(),
|
31 |
+
'Unbounce Plugin Version' => '1.0.23',
|
32 |
'Permalink Structure' => get_option('permalink_structure', ''),
|
33 |
'Domain' => $domain,
|
34 |
'Domain Authorized' => print_r(UBConfig::is_authorized_domain($domain), true),
|
UBHTTP.php
CHANGED
@@ -51,7 +51,9 @@ class UBHTTP {
|
|
51 |
public static function get_proxied_for_header($out_headers,
|
52 |
$forwarded_for,
|
53 |
$current_ip) {
|
54 |
-
if($forwarded_for !== null &&
|
|
|
|
|
55 |
$proxied_for = $forwarded_for;
|
56 |
} else {
|
57 |
$proxied_for = $current_ip;
|
51 |
public static function get_proxied_for_header($out_headers,
|
52 |
$forwarded_for,
|
53 |
$current_ip) {
|
54 |
+
if($forwarded_for !== null &&
|
55 |
+
(UBConfig::allow_public_address_x_forwarded_for() ||
|
56 |
+
UBHTTP::is_private_ip_address($current_ip))) {
|
57 |
$proxied_for = $forwarded_for;
|
58 |
} else {
|
59 |
$proxied_for = $current_ip;
|
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.
|
7 |
Author: Unbounce
|
8 |
Author URI: http://unbounce.com
|
9 |
License: GPLv2
|
@@ -16,7 +16,7 @@ require_once dirname(__FILE__) . '/UBConfig.php';
|
|
16 |
require_once dirname(__FILE__) . '/UBLogger.php';
|
17 |
require_once dirname(__FILE__) . '/UBHTTP.php';
|
18 |
require_once dirname(__FILE__) . '/UBIcon.php';
|
19 |
-
require_once dirname(__FILE__).'/UBWPListTable.php';
|
20 |
require_once dirname(__FILE__) . '/UBPageTable.php';
|
21 |
require_once dirname(__FILE__) . '/UBEvents.php';
|
22 |
require_once dirname(__FILE__) . '/UBTemplate.php';
|
@@ -41,6 +41,7 @@ register_activation_hook(__FILE__, function() {
|
|
41 |
add_option(UBConfig::UB_DOMAIN_ID_KEY, '');
|
42 |
add_option(UBConfig::UB_CLIENT_ID_KEY, '');
|
43 |
add_option(UBConfig::UB_PROXY_ERROR_MESSAGE_KEY, '');
|
|
|
44 |
});
|
45 |
|
46 |
register_deactivation_hook(__FILE__, function() {
|
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.23
|
7 |
Author: Unbounce
|
8 |
Author URI: http://unbounce.com
|
9 |
License: GPLv2
|
16 |
require_once dirname(__FILE__) . '/UBLogger.php';
|
17 |
require_once dirname(__FILE__) . '/UBHTTP.php';
|
18 |
require_once dirname(__FILE__) . '/UBIcon.php';
|
19 |
+
require_once dirname(__FILE__) . '/UBWPListTable.php';
|
20 |
require_once dirname(__FILE__) . '/UBPageTable.php';
|
21 |
require_once dirname(__FILE__) . '/UBEvents.php';
|
22 |
require_once dirname(__FILE__) . '/UBTemplate.php';
|
41 |
add_option(UBConfig::UB_DOMAIN_ID_KEY, '');
|
42 |
add_option(UBConfig::UB_CLIENT_ID_KEY, '');
|
43 |
add_option(UBConfig::UB_PROXY_ERROR_MESSAGE_KEY, '');
|
44 |
+
add_option(UBConfig::UB_ALLOW_PUBLIC_ADDRESS_X_FORWARDED_FOR, 0);
|
45 |
});
|
46 |
|
47 |
register_deactivation_hook(__FILE__, function() {
|
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: 4.4
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -89,6 +89,11 @@ to help track down the issue.
|
|
89 |
|
90 |
== Changelog ==
|
91 |
|
|
|
|
|
|
|
|
|
|
|
92 |
= 1.0.22 =
|
93 |
* Add global UB_ENABLE_LOCAL_LOGGING to enable/disable debug logging of Unbounce Plugin
|
94 |
|
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: 4.4
|
6 |
+
Stable tag: 1.0.23
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
+
= 1.0.23 =
|
93 |
+
* Add optional support for web servers with a load balancer or proxy that is on a different network
|
94 |
+
* This feature can be enabled with the ub-allow-public-address-x-forwarded-for option
|
95 |
+
* This feature may decrease the effectiveness of spam detection in some cases, and should only be enabled if absolutely necessary
|
96 |
+
|
97 |
= 1.0.22 =
|
98 |
* Add global UB_ENABLE_LOCAL_LOGGING to enable/disable debug logging of Unbounce Plugin
|
99 |
|
templates/main_authorized_footer.php
CHANGED
@@ -18,4 +18,4 @@ $refresh_button = get_submit_button('refreshing the Published Pages list', 'seco
|
|
18 |
Check out our knowledge base.
|
19 |
</a>
|
20 |
<br/><a class="ub-diagnostics-link" href="<?php echo $diagnostics_url ?>">Click here for troubleshooting and plugin diagnostics</a>
|
21 |
-
<p class="ub-version">Unbounce Version 1.0.
|
18 |
Check out our knowledge base.
|
19 |
</a>
|
20 |
<br/><a class="ub-diagnostics-link" href="<?php echo $diagnostics_url ?>">Click here for troubleshooting and plugin diagnostics</a>
|
21 |
+
<p class="ub-version">Unbounce Version 1.0.23</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.
|
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.23</p>
|