本文整理汇总了PHP中wfUtils::processDetectProxyCallback方法的典型用法代码示例。如果您正苦于以下问题:PHP wfUtils::processDetectProxyCallback方法的具体用法?PHP wfUtils::processDetectProxyCallback怎么用?PHP wfUtils::processDetectProxyCallback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wfUtils
的用法示例。
在下文中一共展示了wfUtils::processDetectProxyCallback方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: veryFirstAction
//.........这里部分代码省略.........
header('Location: ' . wp_login_url());
exit;
} else {
if ($_GET['func'] == 'unlockAllIPs') {
wordfence::status(1, 'info', "Request received via unlock email link to unblock all IPs.");
$wfLog->unblockAllIPs();
$wfLog->unlockAllIPs();
delete_transient('wflginfl_' . bin2hex(wfUtils::inet_pton(wfUtils::getIP())));
//Reset login failure counter
header('Location: ' . wp_login_url());
exit;
} else {
if ($_GET['func'] == 'disableRules') {
wfConfig::set('firewallEnabled', 0);
wfConfig::set('loginSecurityEnabled', 0);
wordfence::status(1, 'info', "Request received via unlock email link to unblock all IPs via disabling firewall rules.");
$wfLog->unblockAllIPs();
$wfLog->unlockAllIPs();
delete_transient('wflginfl_' . bin2hex(wfUtils::inet_pton(wfUtils::getIP())));
//Reset login failure counter
wfConfig::set('cbl_countries', '');
//unblock all countries
header('Location: ' . wp_login_url());
exit;
} else {
echo "Invalid function specified. Please check the link we emailed you and make sure it was not cut-off by your email reader.";
exit;
}
}
}
} else {
if ($wfFunc == 'detectProxy') {
wfUtils::doNotCache();
if (wfUtils::processDetectProxyCallback()) {
self::getLog()->getCurrentRequest()->action = 'scan:detectproxy';
//Exempt a valid callback from live traffic
echo wfConfig::get('detectProxyRecommendation', '-');
} else {
echo '0';
}
exit;
}
}
}
// Sync the WAF data with the database.
if (!WFWAF_SUBDIRECTORY_INSTALL && ($waf = wfWAF::getInstance())) {
try {
$configDefaults = array('apiKey' => wfConfig::get('apiKey'), 'isPaid' => wfConfig::get('isPaid'), 'siteURL' => site_url(), 'homeURL' => home_url(), 'whitelistedIPs' => (string) wfConfig::get('whitelisted'), 'howGetIPs' => (string) wfConfig::get('howGetIPs'), 'other_WFNet' => wfConfig::get('other_WFNet', true), 'pluginABSPATH' => ABSPATH);
foreach ($configDefaults as $key => $value) {
$waf->getStorageEngine()->setConfig($key, $value);
}
if (class_exists('wfWAFIPBlocksController')) {
wfWAFIPBlocksController::synchronizeConfigSettings();
}
if (empty($_GET['wordfence_syncAttackData'])) {
$lastAttackMicroseconds = $wpdb->get_var("SELECT MAX(attackLogTime) FROM {$wpdb->base_prefix}wfHits");
if (get_site_option('wordfence_lastSyncAttackData', 0) < time() - 4) {
if ($waf->getStorageEngine()->hasNewerAttackData($lastAttackMicroseconds)) {
if (get_site_option('wordfence_syncingAttackData') <= time() - 60) {
// Could be the request to itself is not completing, add ajax to the head as a workaround
$attempts = get_site_option('wordfence_syncAttackDataAttempts', 0);
if ($attempts > 10) {
add_action('wp_head', 'wordfence::addSyncAttackDataAjax');
add_action('login_head', 'wordfence::addSyncAttackDataAjax');
add_action('admin_head', 'wordfence::addSyncAttackDataAjax');
} else {