Merged in release/release-1.09 (pull request #10)

Release/release 1.09

* Install missing plugins 
* rs set to 1

* rebase pantheon for aws

* rebase pantheon for aws

* prod config change

* prod config change

* fix campaing issue

* revert


Approved-by: Jay Sharma
This commit is contained in:
Rachit Bhargava
2023-12-27 20:55:58 +00:00
committed by Jay Sharma
parent 779393381f
commit 22f10a9edd
2154 changed files with 22313 additions and 209875 deletions

View File

@@ -58,42 +58,12 @@ $selectOptions = array(
</li>
</ul>
</li>
<li id="howGetIPs-trusted-proxy-preset">
<ul id="wf-option-howGetIPs-trusted-proxy-preset" class="wf-option wf-option-select" data-text-option="howGetIPs_trusted_proxy_preset" data-original-text-value="<?php echo esc_attr(wfConfig::get('howGetIPs_trusted_proxy_preset')); ?>">
<li class="wf-option-spacer"></li>
<li class="wf-option-content">
<ul>
<li class="wf-option-title">
<ul class="wf-flex-vertical wf-flex-align-left">
<li><span id="wf-option-howGetIPs-trusted-proxy-preset-label"><?php esc_html_e('Trusted Proxy Preset', 'wordfence'); ?></span></li>
<li class="wf-option-subtitle"><?php esc_html_e('In addition to the above list, the IPs (or CIDR ranges) in the selected preset will be ignored when determining the requesting IP via the X-Forwarded-For HTTP header.', 'wordfence'); ?></li>
</ul>
</li>
<li class="wf-option-select">
<?php
$presets = wfConfig::getJSON('ipResolutionList', array());
if (!is_array($presets)) {
$presets = array();
}
$keys = array_keys($presets); asort($keys);
?>
<select<?php echo (!empty($presets) ? '' : ' disabled'); ?> aria-labelledby="wf-option-howGetIPs-trusted-proxy-preset-label">
<option class="wf-option-select-option" value=""<?php if (!in_array(wfConfig::get('howGetIPs_trusted_proxy_preset'), $keys)) { echo ' selected'; } ?>><?php esc_html_e('None', 'wordfence'); ?></option>
<?php foreach ($keys as $k): ?>
<option class="wf-option-select-option" value="<?php echo esc_attr($k); ?>"<?php if ($k == wfConfig::get('howGetIPs_trusted_proxy_preset')) { echo ' selected'; } ?>><?php echo esc_html($presets[$k]['name']); ?></option>
<?php endforeach; ?>
</select>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<script type="application/javascript">
(function($) {
$(function() {
var updateIPPreview = function() {
WFAD.updateIPPreview({howGetIPs: $('input[name="wf-howgetIPs"]:checked').val(), 'howGetIPs_trusted_proxies': $('#howGetIPs-trusted-proxies textarea').val(), 'howGetIPs_trusted_proxy_preset': $('#howGetIPs-trusted-proxy-preset select').val()}, function(ret) {
WFAD.updateIPPreview({howGetIPs: $('input[name="wf-howgetIPs"]:checked').val(), 'howGetIPs_trusted_proxies': $('#howGetIPs-trusted-proxies textarea').val()}, function(ret) {
if (ret && ret.ok) {
$('#howGetIPs-preview-all').html(ret.ipAll);
$('#howGetIPs-preview-single').html(ret.ip);
@@ -146,29 +116,6 @@ $selectOptions = array(
}, 4);
});
$('#howGetIPs-trusted-proxy-preset').on('change', function() {
var e = this;
setTimeout(function() {
clearTimeout(coalescingUpdateTimer);
coalescingUpdateTimer = setTimeout(updateIPPreview, 1000);
var optionElement = $(e).find('.wf-option.wf-option-select');
var option = optionElement.data('textOption');
var value = $(e).find('select').val();
var originalValue = optionElement.data('originalTextValue');
if (originalValue == value) {
delete WFAD.pendingChanges[option];
}
else {
WFAD.pendingChanges[option] = value;
}
WFAD.updatePendingChanges();
}, 4);
});
$(window).on('wfOptionsReset', function() {
$('input[name="wf-howgetIPs"]').each(function() {
var optionElement = $(this).closest('.wf-option.wf-option-howgetips');
@@ -208,12 +155,6 @@ $selectOptions = array(
$('#howGetIPs-trusted-proxies').removeClass('wf-active');
}
});
$('#howGetIPs-trusted-proxy-preset').slideUp({
always: function() {
$('#howGetIPs-trusted-proxy-preset').removeClass('wf-active');
}
});
}
else {
$(this).parent().slideUp();
@@ -222,12 +163,6 @@ $selectOptions = array(
$('#howGetIPs-trusted-proxies').addClass('wf-active');
}
});
$('#howGetIPs-trusted-proxy-preset').slideDown({
always: function() {
$('#howGetIPs-trusted-proxy-preset').addClass('wf-active');
}
});
}
});
});