Changeset 2107617
- Timestamp:
- 06/17/2019 07:05:45 PM (7 years ago)
- Location:
- wordfence
- Files:
-
- 114 added
- 116 deleted
- 14 edited
- 1 copied
-
tags/7.3.4 (copied) (copied from wordfence/trunk)
-
tags/7.3.4/css/activity-report-widget.1560275180.css (deleted)
-
tags/7.3.4/css/activity-report-widget.1560795818.css (added)
-
tags/7.3.4/css/diff.1560275180.css (deleted)
-
tags/7.3.4/css/diff.1560795818.css (added)
-
tags/7.3.4/css/dt_table.1560275180.css (deleted)
-
tags/7.3.4/css/dt_table.1560795818.css (added)
-
tags/7.3.4/css/fullLog.1560275180.css (deleted)
-
tags/7.3.4/css/fullLog.1560795818.css (added)
-
tags/7.3.4/css/iptraf.1560275180.css (deleted)
-
tags/7.3.4/css/iptraf.1560795818.css (added)
-
tags/7.3.4/css/jquery-ui-timepicker-addon.1560275180.css (deleted)
-
tags/7.3.4/css/jquery-ui-timepicker-addon.1560795818.css (added)
-
tags/7.3.4/css/jquery-ui.min.1560275180.css (deleted)
-
tags/7.3.4/css/jquery-ui.min.1560795818.css (added)
-
tags/7.3.4/css/jquery-ui.structure.min.1560275180.css (deleted)
-
tags/7.3.4/css/jquery-ui.structure.min.1560795818.css (added)
-
tags/7.3.4/css/jquery-ui.theme.min.1560275180.css (deleted)
-
tags/7.3.4/css/jquery-ui.theme.min.1560795818.css (added)
-
tags/7.3.4/css/main.1560275180.css (deleted)
-
tags/7.3.4/css/main.1560795818.css (added)
-
tags/7.3.4/css/phpinfo.1560275180.css (deleted)
-
tags/7.3.4/css/phpinfo.1560795818.css (added)
-
tags/7.3.4/css/wf-adminbar.1560275180.css (deleted)
-
tags/7.3.4/css/wf-adminbar.1560795818.css (added)
-
tags/7.3.4/css/wf-colorbox.1560275180.css (deleted)
-
tags/7.3.4/css/wf-colorbox.1560795818.css (added)
-
tags/7.3.4/css/wf-font-awesome.1560275180.css (deleted)
-
tags/7.3.4/css/wf-font-awesome.1560795818.css (added)
-
tags/7.3.4/css/wf-global.1560275180.css (deleted)
-
tags/7.3.4/css/wf-global.1560795818.css (added)
-
tags/7.3.4/css/wf-ionicons.1560275180.css (deleted)
-
tags/7.3.4/css/wf-ionicons.1560795818.css (added)
-
tags/7.3.4/css/wf-onboarding.1560275180.css (deleted)
-
tags/7.3.4/css/wf-onboarding.1560795818.css (added)
-
tags/7.3.4/css/wf-roboto-font.1560275180.css (deleted)
-
tags/7.3.4/css/wf-roboto-font.1560795818.css (added)
-
tags/7.3.4/css/wfselect2.min.1560275180.css (deleted)
-
tags/7.3.4/css/wfselect2.min.1560795818.css (added)
-
tags/7.3.4/css/wordfenceBox.1560275180.css (deleted)
-
tags/7.3.4/css/wordfenceBox.1560795818.css (added)
-
tags/7.3.4/js/Chart.bundle.min.1560275180.js (deleted)
-
tags/7.3.4/js/Chart.bundle.min.1560795818.js (added)
-
tags/7.3.4/js/admin.1560275180.js (deleted)
-
tags/7.3.4/js/admin.1560795818.js (added)
-
tags/7.3.4/js/admin.ajaxWatcher.1560275180.js (deleted)
-
tags/7.3.4/js/admin.ajaxWatcher.1560795818.js (added)
-
tags/7.3.4/js/admin.liveTraffic.1560275180.js (deleted)
-
tags/7.3.4/js/admin.liveTraffic.1560795818.js (added)
-
tags/7.3.4/js/date.1560275180.js (deleted)
-
tags/7.3.4/js/date.1560795818.js (added)
-
tags/7.3.4/js/jquery-ui-timepicker-addon.1560275180.js (deleted)
-
tags/7.3.4/js/jquery-ui-timepicker-addon.1560795818.js (added)
-
tags/7.3.4/js/jquery.colorbox-min.1560275180.js (deleted)
-
tags/7.3.4/js/jquery.colorbox-min.1560795818.js (added)
-
tags/7.3.4/js/jquery.colorbox.1560275180.js (deleted)
-
tags/7.3.4/js/jquery.colorbox.1560795818.js (added)
-
tags/7.3.4/js/jquery.dataTables.min.1560275180.js (deleted)
-
tags/7.3.4/js/jquery.dataTables.min.1560795818.js (added)
-
tags/7.3.4/js/jquery.qrcode.min.1560275180.js (deleted)
-
tags/7.3.4/js/jquery.qrcode.min.1560795818.js (added)
-
tags/7.3.4/js/jquery.tmpl.min.1560275180.js (deleted)
-
tags/7.3.4/js/jquery.tmpl.min.1560795818.js (added)
-
tags/7.3.4/js/jquery.tools.min.1560275180.js (deleted)
-
tags/7.3.4/js/jquery.tools.min.1560795818.js (added)
-
tags/7.3.4/js/knockout-3.3.0.1560275180.js (deleted)
-
tags/7.3.4/js/knockout-3.3.0.1560795818.js (added)
-
tags/7.3.4/js/wfdashboard.1560275180.js (deleted)
-
tags/7.3.4/js/wfdashboard.1560795818.js (added)
-
tags/7.3.4/js/wfdropdown.1560275180.js (deleted)
-
tags/7.3.4/js/wfdropdown.1560795818.js (added)
-
tags/7.3.4/js/wfglobal.1560275180.js (deleted)
-
tags/7.3.4/js/wfglobal.1560795818.js (added)
-
tags/7.3.4/js/wfpopover.1560275180.js (deleted)
-
tags/7.3.4/js/wfpopover.1560795818.js (added)
-
tags/7.3.4/js/wfselect2.min.1560275180.js (deleted)
-
tags/7.3.4/js/wfselect2.min.1560795818.js (added)
-
tags/7.3.4/lib/wfAlerts.php (added)
-
tags/7.3.4/lib/wfCentralAPI.php (modified) (2 diffs)
-
tags/7.3.4/lib/wfConfig.php (modified) (3 diffs)
-
tags/7.3.4/lib/wfLog.php (modified) (3 diffs)
-
tags/7.3.4/lib/wordfenceClass.php (modified) (9 diffs)
-
tags/7.3.4/modules/login-security/css/admin-global.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/admin-global.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/admin.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/admin.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/colorbox.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/colorbox.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/font-awesome.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/font-awesome.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/ionicons.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/ionicons.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/jquery-ui-timepicker-addon.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/jquery-ui-timepicker-addon.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/jquery-ui.min.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/jquery-ui.min.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/jquery-ui.structure.min.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/jquery-ui.structure.min.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/jquery-ui.theme.min.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/jquery-ui.theme.min.1560795818.css (added)
-
tags/7.3.4/modules/login-security/css/login.1560275180.css (deleted)
-
tags/7.3.4/modules/login-security/css/login.1560795818.css (added)
-
tags/7.3.4/modules/login-security/js/admin-global.1560275180.js (deleted)
-
tags/7.3.4/modules/login-security/js/admin-global.1560795818.js (added)
-
tags/7.3.4/modules/login-security/js/admin.1560275180.js (deleted)
-
tags/7.3.4/modules/login-security/js/admin.1560795818.js (added)
-
tags/7.3.4/modules/login-security/js/jquery-ui-timepicker-addon.1560275180.js (deleted)
-
tags/7.3.4/modules/login-security/js/jquery-ui-timepicker-addon.1560795818.js (added)
-
tags/7.3.4/modules/login-security/js/jquery.colorbox.1560275180.js (deleted)
-
tags/7.3.4/modules/login-security/js/jquery.colorbox.1560795818.js (added)
-
tags/7.3.4/modules/login-security/js/jquery.colorbox.min.1560275180.js (deleted)
-
tags/7.3.4/modules/login-security/js/jquery.colorbox.min.1560795818.js (added)
-
tags/7.3.4/modules/login-security/js/jquery.qrcode.min.1560275180.js (deleted)
-
tags/7.3.4/modules/login-security/js/jquery.qrcode.min.1560795818.js (added)
-
tags/7.3.4/modules/login-security/js/jquery.tmpl.min.1560275180.js (deleted)
-
tags/7.3.4/modules/login-security/js/jquery.tmpl.min.1560795818.js (added)
-
tags/7.3.4/modules/login-security/js/login.1560275180.js (deleted)
-
tags/7.3.4/modules/login-security/js/login.1560795818.js (added)
-
tags/7.3.4/modules/login-security/wordfence-login-security.php (modified) (1 diff)
-
tags/7.3.4/readme.txt (modified) (1 diff)
-
tags/7.3.4/vendor/composer/038918d7 (deleted)
-
tags/7.3.4/vendor/geoip2/geoip2/maxmind-db (deleted)
-
tags/7.3.4/wordfence.php (modified) (2 diffs)
-
trunk/css/activity-report-widget.1560275180.css (deleted)
-
trunk/css/activity-report-widget.1560795818.css (added)
-
trunk/css/diff.1560275180.css (deleted)
-
trunk/css/diff.1560795818.css (added)
-
trunk/css/dt_table.1560275180.css (deleted)
-
trunk/css/dt_table.1560795818.css (added)
-
trunk/css/fullLog.1560275180.css (deleted)
-
trunk/css/fullLog.1560795818.css (added)
-
trunk/css/iptraf.1560275180.css (deleted)
-
trunk/css/iptraf.1560795818.css (added)
-
trunk/css/jquery-ui-timepicker-addon.1560275180.css (deleted)
-
trunk/css/jquery-ui-timepicker-addon.1560795818.css (added)
-
trunk/css/jquery-ui.min.1560275180.css (deleted)
-
trunk/css/jquery-ui.min.1560795818.css (added)
-
trunk/css/jquery-ui.structure.min.1560275180.css (deleted)
-
trunk/css/jquery-ui.structure.min.1560795818.css (added)
-
trunk/css/jquery-ui.theme.min.1560275180.css (deleted)
-
trunk/css/jquery-ui.theme.min.1560795818.css (added)
-
trunk/css/main.1560275180.css (deleted)
-
trunk/css/main.1560795818.css (added)
-
trunk/css/phpinfo.1560275180.css (deleted)
-
trunk/css/phpinfo.1560795818.css (added)
-
trunk/css/wf-adminbar.1560275180.css (deleted)
-
trunk/css/wf-adminbar.1560795818.css (added)
-
trunk/css/wf-colorbox.1560275180.css (deleted)
-
trunk/css/wf-colorbox.1560795818.css (added)
-
trunk/css/wf-font-awesome.1560275180.css (deleted)
-
trunk/css/wf-font-awesome.1560795818.css (added)
-
trunk/css/wf-global.1560275180.css (deleted)
-
trunk/css/wf-global.1560795818.css (added)
-
trunk/css/wf-ionicons.1560275180.css (deleted)
-
trunk/css/wf-ionicons.1560795818.css (added)
-
trunk/css/wf-onboarding.1560275180.css (deleted)
-
trunk/css/wf-onboarding.1560795818.css (added)
-
trunk/css/wf-roboto-font.1560275180.css (deleted)
-
trunk/css/wf-roboto-font.1560795818.css (added)
-
trunk/css/wfselect2.min.1560275180.css (deleted)
-
trunk/css/wfselect2.min.1560795818.css (added)
-
trunk/css/wordfenceBox.1560275180.css (deleted)
-
trunk/css/wordfenceBox.1560795818.css (added)
-
trunk/js/Chart.bundle.min.1560275180.js (deleted)
-
trunk/js/Chart.bundle.min.1560795818.js (added)
-
trunk/js/admin.1560275180.js (deleted)
-
trunk/js/admin.1560795818.js (added)
-
trunk/js/admin.ajaxWatcher.1560275180.js (deleted)
-
trunk/js/admin.ajaxWatcher.1560795818.js (added)
-
trunk/js/admin.liveTraffic.1560275180.js (deleted)
-
trunk/js/admin.liveTraffic.1560795818.js (added)
-
trunk/js/date.1560275180.js (deleted)
-
trunk/js/date.1560795818.js (added)
-
trunk/js/jquery-ui-timepicker-addon.1560275180.js (deleted)
-
trunk/js/jquery-ui-timepicker-addon.1560795818.js (added)
-
trunk/js/jquery.colorbox-min.1560275180.js (deleted)
-
trunk/js/jquery.colorbox-min.1560795818.js (added)
-
trunk/js/jquery.colorbox.1560275180.js (deleted)
-
trunk/js/jquery.colorbox.1560795818.js (added)
-
trunk/js/jquery.dataTables.min.1560275180.js (deleted)
-
trunk/js/jquery.dataTables.min.1560795818.js (added)
-
trunk/js/jquery.qrcode.min.1560275180.js (deleted)
-
trunk/js/jquery.qrcode.min.1560795818.js (added)
-
trunk/js/jquery.tmpl.min.1560275180.js (deleted)
-
trunk/js/jquery.tmpl.min.1560795818.js (added)
-
trunk/js/jquery.tools.min.1560275180.js (deleted)
-
trunk/js/jquery.tools.min.1560795818.js (added)
-
trunk/js/knockout-3.3.0.1560275180.js (deleted)
-
trunk/js/knockout-3.3.0.1560795818.js (added)
-
trunk/js/wfdashboard.1560275180.js (deleted)
-
trunk/js/wfdashboard.1560795818.js (added)
-
trunk/js/wfdropdown.1560275180.js (deleted)
-
trunk/js/wfdropdown.1560795818.js (added)
-
trunk/js/wfglobal.1560275180.js (deleted)
-
trunk/js/wfglobal.1560795818.js (added)
-
trunk/js/wfpopover.1560275180.js (deleted)
-
trunk/js/wfpopover.1560795818.js (added)
-
trunk/js/wfselect2.min.1560275180.js (deleted)
-
trunk/js/wfselect2.min.1560795818.js (added)
-
trunk/lib/wfAlerts.php (added)
-
trunk/lib/wfCentralAPI.php (modified) (2 diffs)
-
trunk/lib/wfConfig.php (modified) (3 diffs)
-
trunk/lib/wfLog.php (modified) (3 diffs)
-
trunk/lib/wordfenceClass.php (modified) (9 diffs)
-
trunk/modules/login-security/css/admin-global.1560275180.css (deleted)
-
trunk/modules/login-security/css/admin-global.1560795818.css (added)
-
trunk/modules/login-security/css/admin.1560275180.css (deleted)
-
trunk/modules/login-security/css/admin.1560795818.css (added)
-
trunk/modules/login-security/css/colorbox.1560275180.css (deleted)
-
trunk/modules/login-security/css/colorbox.1560795818.css (added)
-
trunk/modules/login-security/css/font-awesome.1560275180.css (deleted)
-
trunk/modules/login-security/css/font-awesome.1560795818.css (added)
-
trunk/modules/login-security/css/ionicons.1560275180.css (deleted)
-
trunk/modules/login-security/css/ionicons.1560795818.css (added)
-
trunk/modules/login-security/css/jquery-ui-timepicker-addon.1560275180.css (deleted)
-
trunk/modules/login-security/css/jquery-ui-timepicker-addon.1560795818.css (added)
-
trunk/modules/login-security/css/jquery-ui.min.1560275180.css (deleted)
-
trunk/modules/login-security/css/jquery-ui.min.1560795818.css (added)
-
trunk/modules/login-security/css/jquery-ui.structure.min.1560275180.css (deleted)
-
trunk/modules/login-security/css/jquery-ui.structure.min.1560795818.css (added)
-
trunk/modules/login-security/css/jquery-ui.theme.min.1560275180.css (deleted)
-
trunk/modules/login-security/css/jquery-ui.theme.min.1560795818.css (added)
-
trunk/modules/login-security/css/login.1560275180.css (deleted)
-
trunk/modules/login-security/css/login.1560795818.css (added)
-
trunk/modules/login-security/js/admin-global.1560275180.js (deleted)
-
trunk/modules/login-security/js/admin-global.1560795818.js (added)
-
trunk/modules/login-security/js/admin.1560275180.js (deleted)
-
trunk/modules/login-security/js/admin.1560795818.js (added)
-
trunk/modules/login-security/js/jquery-ui-timepicker-addon.1560275180.js (deleted)
-
trunk/modules/login-security/js/jquery-ui-timepicker-addon.1560795818.js (added)
-
trunk/modules/login-security/js/jquery.colorbox.1560275180.js (deleted)
-
trunk/modules/login-security/js/jquery.colorbox.1560795818.js (added)
-
trunk/modules/login-security/js/jquery.colorbox.min.1560275180.js (deleted)
-
trunk/modules/login-security/js/jquery.colorbox.min.1560795818.js (added)
-
trunk/modules/login-security/js/jquery.qrcode.min.1560275180.js (deleted)
-
trunk/modules/login-security/js/jquery.qrcode.min.1560795818.js (added)
-
trunk/modules/login-security/js/jquery.tmpl.min.1560275180.js (deleted)
-
trunk/modules/login-security/js/jquery.tmpl.min.1560795818.js (added)
-
trunk/modules/login-security/js/login.1560275180.js (deleted)
-
trunk/modules/login-security/js/login.1560795818.js (added)
-
trunk/modules/login-security/wordfence-login-security.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/vendor/composer/038918d7 (deleted)
-
trunk/vendor/geoip2/geoip2/maxmind-db (deleted)
-
trunk/wordfence.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wordfence/tags/7.3.4/lib/wfCentralAPI.php
r2104182 r2107617 48 48 $args['headers'] = array(); 49 49 } 50 $args['cookies']['XDEBUG_SESSION'] = 'XDEBUG_ECLIPSE';51 50 52 51 $token = $this->getToken(); … … 502 501 return false; 503 502 } 503 504 /** 505 * @param string $event 506 * @param array $data 507 * @param callable|null $alertCallback 508 */ 509 public static function sendSecurityEvent($event, $data = array(), $alertCallback = null) { 510 $alerted = false; 511 if (!self::pluginAlertingDisabled() && is_callable($alertCallback)) { 512 call_user_func($alertCallback); 513 $alerted = true; 514 } 515 516 $siteID = wfConfig::get('wordfenceCentralSiteID'); 517 $request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/security-events', 'POST', array( 518 'data' => array( 519 array( 520 'type' => 'security-event', 521 'attributes' => array( 522 'type' => $event, 523 'data' => $data, 524 'event_time' => microtime(true), 525 ), 526 ), 527 ), 528 )); 529 try { 530 // Attempt to send the security event to Central. 531 $response = $request->execute(); 532 } catch (wfCentralAPIException $e) { 533 // If we didn't alert previously, notify the user now in the event Central is down. 534 if (!$alerted && is_callable($alertCallback)) { 535 call_user_func($alertCallback); 536 } 537 } 538 } 539 540 /** 541 * @param $event 542 * @param array $data 543 * @param callable|null $alertCallback 544 */ 545 public static function sendAlertCallback($event, $data = array(), $alertCallback = null) { 546 if (is_callable($alertCallback)) { 547 call_user_func($alertCallback); 548 } 549 } 550 551 public static function pluginAlertingDisabled() { 552 if (!self::isConnected()) { 553 return false; 554 } 555 556 return wfConfig::get('wordfenceCentralPluginAlertingDisabled', false); 557 } 504 558 } -
wordfence/tags/7.3.4/lib/wfConfig.php
r2087795 r2107617 232 232 'wordfenceCentralUserSiteAuthGrant', 233 233 'wordfenceCentralConnected', 234 'wordfenceCentralPluginAlertingDisabled', 234 235 ); 235 236 … … 990 991 if($upret){ 991 992 $cont = file_get_contents(WORDFENCE_FCPATH); 992 if(wfConfig::get('alertOn_update') == '1' && preg_match('/Version: (\d+\.\d+\.\d+)/', $cont, $matches) ){ 993 wordfence::alert("Wordfence Upgraded to version " . $matches[1], "Your Wordfence installation has been upgraded to version " . $matches[1], '127.0.0.1'); 994 } 993 preg_match('/Version: (\d+\.\d+\.\d+)/', $cont, $matches); 994 $version = !empty($matches) ? $matches[1] : null; 995 $alertCallback = array(new wfAutoUpdatedAlert($version), 'send'); 996 do_action('wordfence_security_event', 'autoUpdate', array( 997 'version' => $version, 998 'ip' => wfUtils::getIP(), 999 ), $alertCallback); 1000 995 1001 wfConfig::set('autoUpdateAttempts', 0); 996 1002 } … … 1329 1335 1330 1336 if ($value == wfFirewall::FIREWALL_MODE_DISABLED) { 1331 if (wfConfig::get('alertOn_wafDeactivated')) { 1332 $currentUser = wp_get_current_user(); 1333 $username = $currentUser->user_login; 1334 wordfence::alert(__('Wordfence WAF Deactivated', 'wordfence'), sprintf(__('A user with username "%s" deactivated the Wordfence Web Application Firewall on your WordPress site.', 'wordfence'), $username), wfUtils::getIP()); 1335 } 1337 $currentUser = wp_get_current_user(); 1338 $username = $currentUser->user_login; 1339 1340 $alertCallback = array(new wfWafDeactivatedAlert($username, wfUtils::getIP()), 'send'); 1341 do_action('wordfence_security_event', 'wafDeactivated', array( 1342 'username' => $username, 1343 'ip' => wfUtils::getIP(), 1344 ), $alertCallback); 1336 1345 } 1337 1346 -
wordfence/tags/7.3.4/lib/wfLog.php
r2087795 r2107617 633 633 wfActivityReport::logBlockedIP($IP, null, 'throttle'); 634 634 $this->tagRequestForBlock($reason); 635 636 if (wfConfig::get('alertOn_block')) { 637 $message = sprintf(__('Wordfence has blocked IP address %s.', 'wordfence'), $IP) . "\n"; 638 $message .= sprintf(__('The reason is: "%s".', 'wordfence'), $reason); 639 if ($secsToGo > 0) { 640 $message .= "\n" . sprintf(__('The duration of the block is %s.', 'wordfence'), wfUtils::makeDuration($secsToGo, true)); 641 } 642 wordfence::alert(sprintf(__('Blocking IP %s', 'wordfence'), $IP), $message, $IP); 643 } 635 636 $alertCallback = array(new wfBlockAlert($IP, $reason, $secsToGo), 'send'); 637 638 do_action('wordfence_security_event', 'block', array( 639 'ip' => $IP, 640 'reason' => $reason, 641 'duration' => $secsToGo, 642 ), $alertCallback); 644 643 wordfence::status(2, 'info', sprintf(__('Blocking IP %s. %s', 'wordfence'), $IP, $reason)); 645 644 } … … 648 647 wfBlock::createRateThrottle($reason, $IP, $secsToGo); 649 648 wfActivityReport::logBlockedIP($IP, null, 'throttle'); 650 649 650 do_action('wordfence_security_event', 'throttle', array( 651 'ip' => $IP, 652 'reason' => $reason, 653 'duration' => $secsToGo, 654 )); 651 655 wordfence::status(2, 'info', sprintf(__('Throttling IP %s. %s', 'wordfence'), $IP, $reason)); 652 656 wfConfig::inc('totalIPsThrottled'); 653 657 } 654 $this->do503($secsToGo, $reason );658 $this->do503($secsToGo, $reason, false); 655 659 } 656 660 … … 670 674 } 671 675 672 public function do503($secsToGo, $reason ){676 public function do503($secsToGo, $reason, $sendEventToCentral = true){ 673 677 $this->initLogRequest(); 678 679 if ($sendEventToCentral) { 680 do_action('wordfence_security_event', 'block', array( 681 'ip' => wfUtils::inet_ntop($this->currentRequest->IP), 682 'reason' => $this->currentRequest->actionDescription ? $this->currentRequest->actionDescription : $reason, 683 'duration' => $secsToGo, 684 )); 685 } 686 674 687 $this->currentRequest->statusCode = 503; 675 688 if (!$this->currentRequest->action) { -
wordfence/tags/7.3.4/lib/wordfenceClass.php
r2104182 r2107617 42 42 require_once(dirname(__FILE__) . '/wfAdminNoticeQueue.php'); 43 43 require_once(dirname(__FILE__) . '/wfModuleController.php'); 44 require_once(dirname(__FILE__) . '/wfAlerts.php'); 44 45 45 46 if (version_compare(phpversion(), '5.3', '>=')) { … … 96 97 public static function uninstallPlugin(){ 97 98 //Send admin alert 98 if (wfConfig::get('alertOn_wordfenceDeactivated')) { 99 $currentUser = wp_get_current_user(); 100 $username = $currentUser->user_login; 101 wordfence::alert("Wordfence Deactivated", "A user with username \"$username\" deactivated Wordfence on your WordPress site.", wfUtils::getIP()); 102 } 99 $currentUser = wp_get_current_user(); 100 $username = $currentUser->user_login; 101 $alertCallback = array(new wfWordfenceDeactivatedAlert($username, wfUtils::getIP()), 'send'); 102 do_action('wordfence_security_event', 'wordfenceDeactivated', array( 103 'username' => $username, 104 'ip' => wfUtils::getIP(), 105 ), $alertCallback); 103 106 104 107 //Check if caching is enabled and if it is, disable it and fix the .htaccess file. … … 1311 1314 add_action('rest_api_init', 'wordfence::initRestAPI'); 1312 1315 1316 if (wfCentral::isConnected()) { 1317 add_action('wordfence_security_event', 'wfCentral::sendSecurityEvent', 10, 3); 1318 } else { 1319 add_action('wordfence_security_event', 'wfCentral::sendAlertCallback', 10, 3); 1320 } 1313 1321 } 1314 1322 public static function _pluginPageActionLinks($links) { … … 1665 1673 1666 1674 if($user){ 1667 if(wfConfig::get('alertOn_lostPasswdForm')){ 1668 wordfence::alert("Password recovery attempted", "Someone tried to recover the password for user with email address: " . wp_kses($user->user_email, array()), $IP); 1669 } 1675 $alertCallback = array(new wfLostPasswdFormAlert($user, wfUtils::getIP()), 'send'); 1676 do_action('wordfence_security_event', 'lostPasswdForm', array( 1677 'email' => $user->user_email, 1678 'ip' => wfUtils::getIP(), 1679 ), $alertCallback); 1680 1670 1681 } 1671 1682 if(wfConfig::get('loginSecurityEnabled')){ … … 1688 1699 wfBlock::createLockout($reason, $IP, wfBlock::lockoutDuration(), time(), time(), 1); 1689 1700 self::getLog()->tagRequestForLockout($reason); 1690 if (wfConfig::get('alertOn_loginLockout')) {1691 $message = sprintf(__('A user with IP addr %s has been locked out from signing in or using the password recovery form for the following reason: %s.', 'wordfence'), $IP, $reason);1692 if (wfBlock::lockoutDuration() > 0) {1693 $message .= "\n" . sprintf(__('The duration of the lockout is %s.', 'wordfence'), wfUtils::makeDuration(wfBlock::lockoutDuration(), true));1694 }1695 wordfence::alert(__('User locked out from signing in', 'wordfence'), $message, $IP);1696 } 1701 $alertCallback = array(new wfLoginLockoutAlert($IP, $reason), 'send'); 1702 do_action('wordfence_security_event', 'loginLockout', array( 1703 'ip' => $IP, 1704 'reason' => $reason, 1705 'duration' => wfBlock::lockoutDuration(), 1706 ), $alertCallback); 1707 1697 1708 } 1698 1709 … … 2403 2414 $cookievalue = hash_hmac('sha256', $user->user_login, $salt); 2404 2415 if(wfUtils::isAdmin($userID)){ 2405 if(wfConfig::get('alertOn_adminLogin')){2406 $shouldAlert = true;2407 if (wfConfig::get('alertOn_firstAdminLoginOnly') && isset($_COOKIE[$cookiename])) {2408 $shouldAlert = !hash_equals($cookievalue, $_COOKIE[$cookiename]);2409 }2410 2411 if ($shouldAlert) {2412 wordfence::alert("Admin Login", "A user with username \"$username\" who has administrator access signed in to your WordPress site.", wfUtils::getIP());2413 }2414 } 2416 $securityEvent = 'adminLoginNewLocation'; 2417 if (isset($_COOKIE[$cookiename]) && hash_equals($cookievalue, $_COOKIE[$cookiename])) { 2418 $securityEvent = 'adminLogin'; 2419 } 2420 $alertCallback = array(new wfAdminLoginAlert($cookiename, $cookievalue, $username, wfUtils::getIP()), 'send'); 2421 do_action('wordfence_security_event', $securityEvent, array( 2422 'username' => $username, 2423 'ip' => wfUtils::getIP(), 2424 ), $alertCallback); 2425 2415 2426 } else { 2416 if(wfConfig::get('alertOn_nonAdminLogin')){ 2417 $shouldAlert = true; 2418 if (wfConfig::get('alertOn_firstNonAdminLoginOnly') && isset($_COOKIE[$cookiename])) { 2419 $shouldAlert = !hash_equals($cookievalue, $_COOKIE[$cookiename]); 2420 } 2421 2422 if ($shouldAlert) { 2423 wordfence::alert("User login", "A non-admin user with username \"$username\" signed in to your WordPress site.", wfUtils::getIP()); 2424 } 2425 } 2427 $securityEvent = 'nonAdminLoginNewLocation'; 2428 if (isset($_COOKIE[$cookiename]) && hash_equals($cookievalue, $_COOKIE[$cookiename])) { 2429 $securityEvent = 'nonAdminLogin'; 2430 } 2431 $alertCallback = array(new wfNonAdminLoginAlert($cookiename, $cookievalue, $username, wfUtils::getIP()), 'send'); 2432 do_action('wordfence_security_event', $securityEvent, array( 2433 'username' => $username, 2434 'ip' => wfUtils::getIP(), 2435 ), $alertCallback); 2426 2436 } 2427 2437 … … 2923 2933 $username = $authUser->user_login; 2924 2934 self::getLog()->logLogin('loginFailValidUsername', 1, $username); 2925 if (wfConfig::get('alertOn_breachLogin')) { 2926 wordfence::alert(__('User login blocked for insecure password', 'wordfence'), sprintf(__('A user with username "%s" tried to sign in to your WordPress site. Access was denied because the password being used exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please change or reset the password (%s) to reactivate this account. Learn More: %s', 'wordfence'), $username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD)), wfUtils::getIP()); 2927 } 2935 $alertCallback = array(new wfBreachLoginAlert($username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), wfUtils::getIP()), 'send'); 2936 2937 do_action('wordfence_security_event', 'breachLogin', array( 2938 'username' => $username, 2939 'resetPasswordURL' => wp_lostpassword_url(), 2940 'supportURL' => wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), 2941 'ip' => wfUtils::getIP(), 2942 ), $alertCallback); 2928 2943 2929 2944 remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages … … 2952 2967 $username = $authUser->user_login; 2953 2968 self::getLog()->logLogin('loginFailValidUsername', 1, $username); 2954 if (wfConfig::get('alertOn_breachLogin')) { 2955 wordfence::alert(__('User login blocked for insecure password', 'wordfence'), sprintf(__('A user with username "%s" tried to sign in to your WordPress site. Access was denied because the password being used exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please change or reset the password (%s) to reactivate this account. Learn More: %s', 'wordfence'), $username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD)), wfUtils::getIP()); 2956 } 2957 2969 $alertCallback = array(new wfBreachLoginAlert($username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), wfUtils::getIP()), 'send'); 2970 2971 do_action('wordfence_security_event', 'breachLogin', array( 2972 'username' => $username, 2973 'resetPasswordURL' => wp_lostpassword_url(), 2974 'supportURL' => wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), 2975 'ip' => wfUtils::getIP(), 2976 ), $alertCallback); 2977 2958 2978 remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages 2959 2979 self::$authError = new WP_Error('breached_password', sprintf(__('<strong>INSECURE PASSWORD:</strong> Your login attempt has been blocked because the password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please <a href="%s">reset your password</a> to reactivate your account. <a href="%s" target="_blank" rel="noopener noreferrer">Learn More</a>'), wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD))); … … 7876 7896 } 7877 7897 7878 self::alert('Increased Attack Rate', $message, false); 7898 $alertCallback = array(new wfIncreasedAttackRateAlert($message), 'send'); 7899 do_action('wordfence_security_event', 'increasedAttackRate', array( 7900 'attackCount' => $attackCount, 7901 'attackTable' => $attackTable, 7902 'duration' => $alertInterval, 7903 'ip' => wfUtils::getIP(), 7904 ), $alertCallback); 7905 7879 7906 wfConfig::set('wafAlertLastSendTime', time()); 7880 7907 } -
wordfence/tags/7.3.4/modules/login-security/wordfence-login-security.php
r2104182 r2107617 28 28 29 29 define('WORDFENCE_LS_VERSION', '1.0.2'); 30 define('WORDFENCE_LS_BUILD_NUMBER', '1560 275180');30 define('WORDFENCE_LS_BUILD_NUMBER', '1560795818'); 31 31 32 32 if (!WORDFENCE_LS_FROM_CORE) { -
wordfence/tags/7.3.4/readme.txt
r2104194 r2107617 183 183 184 184 == Changelog == 185 186 = 7.3.4 - June 17, 2019 = 187 * Improvement: Added security events and alerting features built into Wordfence Central. 185 188 186 189 = 7.3.3 - June 11, 2019 = -
wordfence/tags/7.3.4/wordfence.php
r2104182 r2107617 5 5 Description: Wordfence Security - Anti-virus, Firewall and Malware Scan 6 6 Author: Wordfence 7 Version: 7.3. 37 Version: 7.3.4 8 8 Author URI: http://www.wordfence.com/ 9 9 Network: true … … 16 16 exit; 17 17 } 18 define('WORDFENCE_VERSION', '7.3. 3');19 define('WORDFENCE_BUILD_NUMBER', '1560 275180');18 define('WORDFENCE_VERSION', '7.3.4'); 19 define('WORDFENCE_BUILD_NUMBER', '1560795818'); 20 20 define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) : 21 21 basename(dirname(__FILE__)) . '/' . basename(__FILE__)); -
wordfence/trunk/lib/wfCentralAPI.php
r2104182 r2107617 48 48 $args['headers'] = array(); 49 49 } 50 $args['cookies']['XDEBUG_SESSION'] = 'XDEBUG_ECLIPSE';51 50 52 51 $token = $this->getToken(); … … 502 501 return false; 503 502 } 503 504 /** 505 * @param string $event 506 * @param array $data 507 * @param callable|null $alertCallback 508 */ 509 public static function sendSecurityEvent($event, $data = array(), $alertCallback = null) { 510 $alerted = false; 511 if (!self::pluginAlertingDisabled() && is_callable($alertCallback)) { 512 call_user_func($alertCallback); 513 $alerted = true; 514 } 515 516 $siteID = wfConfig::get('wordfenceCentralSiteID'); 517 $request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/security-events', 'POST', array( 518 'data' => array( 519 array( 520 'type' => 'security-event', 521 'attributes' => array( 522 'type' => $event, 523 'data' => $data, 524 'event_time' => microtime(true), 525 ), 526 ), 527 ), 528 )); 529 try { 530 // Attempt to send the security event to Central. 531 $response = $request->execute(); 532 } catch (wfCentralAPIException $e) { 533 // If we didn't alert previously, notify the user now in the event Central is down. 534 if (!$alerted && is_callable($alertCallback)) { 535 call_user_func($alertCallback); 536 } 537 } 538 } 539 540 /** 541 * @param $event 542 * @param array $data 543 * @param callable|null $alertCallback 544 */ 545 public static function sendAlertCallback($event, $data = array(), $alertCallback = null) { 546 if (is_callable($alertCallback)) { 547 call_user_func($alertCallback); 548 } 549 } 550 551 public static function pluginAlertingDisabled() { 552 if (!self::isConnected()) { 553 return false; 554 } 555 556 return wfConfig::get('wordfenceCentralPluginAlertingDisabled', false); 557 } 504 558 } -
wordfence/trunk/lib/wfConfig.php
r2087795 r2107617 232 232 'wordfenceCentralUserSiteAuthGrant', 233 233 'wordfenceCentralConnected', 234 'wordfenceCentralPluginAlertingDisabled', 234 235 ); 235 236 … … 990 991 if($upret){ 991 992 $cont = file_get_contents(WORDFENCE_FCPATH); 992 if(wfConfig::get('alertOn_update') == '1' && preg_match('/Version: (\d+\.\d+\.\d+)/', $cont, $matches) ){ 993 wordfence::alert("Wordfence Upgraded to version " . $matches[1], "Your Wordfence installation has been upgraded to version " . $matches[1], '127.0.0.1'); 994 } 993 preg_match('/Version: (\d+\.\d+\.\d+)/', $cont, $matches); 994 $version = !empty($matches) ? $matches[1] : null; 995 $alertCallback = array(new wfAutoUpdatedAlert($version), 'send'); 996 do_action('wordfence_security_event', 'autoUpdate', array( 997 'version' => $version, 998 'ip' => wfUtils::getIP(), 999 ), $alertCallback); 1000 995 1001 wfConfig::set('autoUpdateAttempts', 0); 996 1002 } … … 1329 1335 1330 1336 if ($value == wfFirewall::FIREWALL_MODE_DISABLED) { 1331 if (wfConfig::get('alertOn_wafDeactivated')) { 1332 $currentUser = wp_get_current_user(); 1333 $username = $currentUser->user_login; 1334 wordfence::alert(__('Wordfence WAF Deactivated', 'wordfence'), sprintf(__('A user with username "%s" deactivated the Wordfence Web Application Firewall on your WordPress site.', 'wordfence'), $username), wfUtils::getIP()); 1335 } 1337 $currentUser = wp_get_current_user(); 1338 $username = $currentUser->user_login; 1339 1340 $alertCallback = array(new wfWafDeactivatedAlert($username, wfUtils::getIP()), 'send'); 1341 do_action('wordfence_security_event', 'wafDeactivated', array( 1342 'username' => $username, 1343 'ip' => wfUtils::getIP(), 1344 ), $alertCallback); 1336 1345 } 1337 1346 -
wordfence/trunk/lib/wfLog.php
r2087795 r2107617 633 633 wfActivityReport::logBlockedIP($IP, null, 'throttle'); 634 634 $this->tagRequestForBlock($reason); 635 636 if (wfConfig::get('alertOn_block')) { 637 $message = sprintf(__('Wordfence has blocked IP address %s.', 'wordfence'), $IP) . "\n"; 638 $message .= sprintf(__('The reason is: "%s".', 'wordfence'), $reason); 639 if ($secsToGo > 0) { 640 $message .= "\n" . sprintf(__('The duration of the block is %s.', 'wordfence'), wfUtils::makeDuration($secsToGo, true)); 641 } 642 wordfence::alert(sprintf(__('Blocking IP %s', 'wordfence'), $IP), $message, $IP); 643 } 635 636 $alertCallback = array(new wfBlockAlert($IP, $reason, $secsToGo), 'send'); 637 638 do_action('wordfence_security_event', 'block', array( 639 'ip' => $IP, 640 'reason' => $reason, 641 'duration' => $secsToGo, 642 ), $alertCallback); 644 643 wordfence::status(2, 'info', sprintf(__('Blocking IP %s. %s', 'wordfence'), $IP, $reason)); 645 644 } … … 648 647 wfBlock::createRateThrottle($reason, $IP, $secsToGo); 649 648 wfActivityReport::logBlockedIP($IP, null, 'throttle'); 650 649 650 do_action('wordfence_security_event', 'throttle', array( 651 'ip' => $IP, 652 'reason' => $reason, 653 'duration' => $secsToGo, 654 )); 651 655 wordfence::status(2, 'info', sprintf(__('Throttling IP %s. %s', 'wordfence'), $IP, $reason)); 652 656 wfConfig::inc('totalIPsThrottled'); 653 657 } 654 $this->do503($secsToGo, $reason );658 $this->do503($secsToGo, $reason, false); 655 659 } 656 660 … … 670 674 } 671 675 672 public function do503($secsToGo, $reason ){676 public function do503($secsToGo, $reason, $sendEventToCentral = true){ 673 677 $this->initLogRequest(); 678 679 if ($sendEventToCentral) { 680 do_action('wordfence_security_event', 'block', array( 681 'ip' => wfUtils::inet_ntop($this->currentRequest->IP), 682 'reason' => $this->currentRequest->actionDescription ? $this->currentRequest->actionDescription : $reason, 683 'duration' => $secsToGo, 684 )); 685 } 686 674 687 $this->currentRequest->statusCode = 503; 675 688 if (!$this->currentRequest->action) { -
wordfence/trunk/lib/wordfenceClass.php
r2104182 r2107617 42 42 require_once(dirname(__FILE__) . '/wfAdminNoticeQueue.php'); 43 43 require_once(dirname(__FILE__) . '/wfModuleController.php'); 44 require_once(dirname(__FILE__) . '/wfAlerts.php'); 44 45 45 46 if (version_compare(phpversion(), '5.3', '>=')) { … … 96 97 public static function uninstallPlugin(){ 97 98 //Send admin alert 98 if (wfConfig::get('alertOn_wordfenceDeactivated')) { 99 $currentUser = wp_get_current_user(); 100 $username = $currentUser->user_login; 101 wordfence::alert("Wordfence Deactivated", "A user with username \"$username\" deactivated Wordfence on your WordPress site.", wfUtils::getIP()); 102 } 99 $currentUser = wp_get_current_user(); 100 $username = $currentUser->user_login; 101 $alertCallback = array(new wfWordfenceDeactivatedAlert($username, wfUtils::getIP()), 'send'); 102 do_action('wordfence_security_event', 'wordfenceDeactivated', array( 103 'username' => $username, 104 'ip' => wfUtils::getIP(), 105 ), $alertCallback); 103 106 104 107 //Check if caching is enabled and if it is, disable it and fix the .htaccess file. … … 1311 1314 add_action('rest_api_init', 'wordfence::initRestAPI'); 1312 1315 1316 if (wfCentral::isConnected()) { 1317 add_action('wordfence_security_event', 'wfCentral::sendSecurityEvent', 10, 3); 1318 } else { 1319 add_action('wordfence_security_event', 'wfCentral::sendAlertCallback', 10, 3); 1320 } 1313 1321 } 1314 1322 public static function _pluginPageActionLinks($links) { … … 1665 1673 1666 1674 if($user){ 1667 if(wfConfig::get('alertOn_lostPasswdForm')){ 1668 wordfence::alert("Password recovery attempted", "Someone tried to recover the password for user with email address: " . wp_kses($user->user_email, array()), $IP); 1669 } 1675 $alertCallback = array(new wfLostPasswdFormAlert($user, wfUtils::getIP()), 'send'); 1676 do_action('wordfence_security_event', 'lostPasswdForm', array( 1677 'email' => $user->user_email, 1678 'ip' => wfUtils::getIP(), 1679 ), $alertCallback); 1680 1670 1681 } 1671 1682 if(wfConfig::get('loginSecurityEnabled')){ … … 1688 1699 wfBlock::createLockout($reason, $IP, wfBlock::lockoutDuration(), time(), time(), 1); 1689 1700 self::getLog()->tagRequestForLockout($reason); 1690 if (wfConfig::get('alertOn_loginLockout')) {1691 $message = sprintf(__('A user with IP addr %s has been locked out from signing in or using the password recovery form for the following reason: %s.', 'wordfence'), $IP, $reason);1692 if (wfBlock::lockoutDuration() > 0) {1693 $message .= "\n" . sprintf(__('The duration of the lockout is %s.', 'wordfence'), wfUtils::makeDuration(wfBlock::lockoutDuration(), true));1694 }1695 wordfence::alert(__('User locked out from signing in', 'wordfence'), $message, $IP);1696 } 1701 $alertCallback = array(new wfLoginLockoutAlert($IP, $reason), 'send'); 1702 do_action('wordfence_security_event', 'loginLockout', array( 1703 'ip' => $IP, 1704 'reason' => $reason, 1705 'duration' => wfBlock::lockoutDuration(), 1706 ), $alertCallback); 1707 1697 1708 } 1698 1709 … … 2403 2414 $cookievalue = hash_hmac('sha256', $user->user_login, $salt); 2404 2415 if(wfUtils::isAdmin($userID)){ 2405 if(wfConfig::get('alertOn_adminLogin')){2406 $shouldAlert = true;2407 if (wfConfig::get('alertOn_firstAdminLoginOnly') && isset($_COOKIE[$cookiename])) {2408 $shouldAlert = !hash_equals($cookievalue, $_COOKIE[$cookiename]);2409 }2410 2411 if ($shouldAlert) {2412 wordfence::alert("Admin Login", "A user with username \"$username\" who has administrator access signed in to your WordPress site.", wfUtils::getIP());2413 }2414 } 2416 $securityEvent = 'adminLoginNewLocation'; 2417 if (isset($_COOKIE[$cookiename]) && hash_equals($cookievalue, $_COOKIE[$cookiename])) { 2418 $securityEvent = 'adminLogin'; 2419 } 2420 $alertCallback = array(new wfAdminLoginAlert($cookiename, $cookievalue, $username, wfUtils::getIP()), 'send'); 2421 do_action('wordfence_security_event', $securityEvent, array( 2422 'username' => $username, 2423 'ip' => wfUtils::getIP(), 2424 ), $alertCallback); 2425 2415 2426 } else { 2416 if(wfConfig::get('alertOn_nonAdminLogin')){ 2417 $shouldAlert = true; 2418 if (wfConfig::get('alertOn_firstNonAdminLoginOnly') && isset($_COOKIE[$cookiename])) { 2419 $shouldAlert = !hash_equals($cookievalue, $_COOKIE[$cookiename]); 2420 } 2421 2422 if ($shouldAlert) { 2423 wordfence::alert("User login", "A non-admin user with username \"$username\" signed in to your WordPress site.", wfUtils::getIP()); 2424 } 2425 } 2427 $securityEvent = 'nonAdminLoginNewLocation'; 2428 if (isset($_COOKIE[$cookiename]) && hash_equals($cookievalue, $_COOKIE[$cookiename])) { 2429 $securityEvent = 'nonAdminLogin'; 2430 } 2431 $alertCallback = array(new wfNonAdminLoginAlert($cookiename, $cookievalue, $username, wfUtils::getIP()), 'send'); 2432 do_action('wordfence_security_event', $securityEvent, array( 2433 'username' => $username, 2434 'ip' => wfUtils::getIP(), 2435 ), $alertCallback); 2426 2436 } 2427 2437 … … 2923 2933 $username = $authUser->user_login; 2924 2934 self::getLog()->logLogin('loginFailValidUsername', 1, $username); 2925 if (wfConfig::get('alertOn_breachLogin')) { 2926 wordfence::alert(__('User login blocked for insecure password', 'wordfence'), sprintf(__('A user with username "%s" tried to sign in to your WordPress site. Access was denied because the password being used exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please change or reset the password (%s) to reactivate this account. Learn More: %s', 'wordfence'), $username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD)), wfUtils::getIP()); 2927 } 2935 $alertCallback = array(new wfBreachLoginAlert($username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), wfUtils::getIP()), 'send'); 2936 2937 do_action('wordfence_security_event', 'breachLogin', array( 2938 'username' => $username, 2939 'resetPasswordURL' => wp_lostpassword_url(), 2940 'supportURL' => wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), 2941 'ip' => wfUtils::getIP(), 2942 ), $alertCallback); 2928 2943 2929 2944 remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages … … 2952 2967 $username = $authUser->user_login; 2953 2968 self::getLog()->logLogin('loginFailValidUsername', 1, $username); 2954 if (wfConfig::get('alertOn_breachLogin')) { 2955 wordfence::alert(__('User login blocked for insecure password', 'wordfence'), sprintf(__('A user with username "%s" tried to sign in to your WordPress site. Access was denied because the password being used exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please change or reset the password (%s) to reactivate this account. Learn More: %s', 'wordfence'), $username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD)), wfUtils::getIP()); 2956 } 2957 2969 $alertCallback = array(new wfBreachLoginAlert($username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), wfUtils::getIP()), 'send'); 2970 2971 do_action('wordfence_security_event', 'breachLogin', array( 2972 'username' => $username, 2973 'resetPasswordURL' => wp_lostpassword_url(), 2974 'supportURL' => wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), 2975 'ip' => wfUtils::getIP(), 2976 ), $alertCallback); 2977 2958 2978 remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages 2959 2979 self::$authError = new WP_Error('breached_password', sprintf(__('<strong>INSECURE PASSWORD:</strong> Your login attempt has been blocked because the password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please <a href="%s">reset your password</a> to reactivate your account. <a href="%s" target="_blank" rel="noopener noreferrer">Learn More</a>'), wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD))); … … 7876 7896 } 7877 7897 7878 self::alert('Increased Attack Rate', $message, false); 7898 $alertCallback = array(new wfIncreasedAttackRateAlert($message), 'send'); 7899 do_action('wordfence_security_event', 'increasedAttackRate', array( 7900 'attackCount' => $attackCount, 7901 'attackTable' => $attackTable, 7902 'duration' => $alertInterval, 7903 'ip' => wfUtils::getIP(), 7904 ), $alertCallback); 7905 7879 7906 wfConfig::set('wafAlertLastSendTime', time()); 7880 7907 } -
wordfence/trunk/modules/login-security/wordfence-login-security.php
r2104182 r2107617 28 28 29 29 define('WORDFENCE_LS_VERSION', '1.0.2'); 30 define('WORDFENCE_LS_BUILD_NUMBER', '1560 275180');30 define('WORDFENCE_LS_BUILD_NUMBER', '1560795818'); 31 31 32 32 if (!WORDFENCE_LS_FROM_CORE) { -
wordfence/trunk/readme.txt
r2104194 r2107617 183 183 184 184 == Changelog == 185 186 = 7.3.4 - June 17, 2019 = 187 * Improvement: Added security events and alerting features built into Wordfence Central. 185 188 186 189 = 7.3.3 - June 11, 2019 = -
wordfence/trunk/wordfence.php
r2104182 r2107617 5 5 Description: Wordfence Security - Anti-virus, Firewall and Malware Scan 6 6 Author: Wordfence 7 Version: 7.3. 37 Version: 7.3.4 8 8 Author URI: http://www.wordfence.com/ 9 9 Network: true … … 16 16 exit; 17 17 } 18 define('WORDFENCE_VERSION', '7.3. 3');19 define('WORDFENCE_BUILD_NUMBER', '1560 275180');18 define('WORDFENCE_VERSION', '7.3.4'); 19 define('WORDFENCE_BUILD_NUMBER', '1560795818'); 20 20 define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) : 21 21 basename(dirname(__FILE__)) . '/' . basename(__FILE__));
Note: See TracChangeset
for help on using the changeset viewer.