Changeset 1177050
- Timestamp:
- 06/08/2015 09:23:58 PM (11 years ago)
- Location:
- wordfence
- Files:
-
- 33 edited
- 19 copied
-
tags/6.0.6 (copied) (copied from wordfence/trunk)
-
tags/6.0.6/css/main.css (copied) (copied from wordfence/trunk/css/main.css)
-
tags/6.0.6/js/admin.js (copied) (copied from wordfence/trunk/js/admin.js) (2 diffs)
-
tags/6.0.6/lib/dashboard.php (copied) (copied from wordfence/trunk/lib/dashboard.php)
-
tags/6.0.6/lib/email_genericAlert.php (modified) (1 diff)
-
tags/6.0.6/lib/email_newIssues.php (modified) (1 diff)
-
tags/6.0.6/lib/email_passwdChanged.php (modified) (1 diff)
-
tags/6.0.6/lib/email_pleaseChangePasswd.php (modified) (1 diff)
-
tags/6.0.6/lib/menu_activity.php (copied) (copied from wordfence/trunk/lib/menu_activity.php)
-
tags/6.0.6/lib/menu_countryBlocking.php (modified) (3 diffs)
-
tags/6.0.6/lib/menu_options.php (copied) (copied from wordfence/trunk/lib/menu_options.php) (4 diffs)
-
tags/6.0.6/lib/menu_passwd.php (modified) (2 diffs)
-
tags/6.0.6/lib/menu_scan.php (modified) (2 diffs)
-
tags/6.0.6/lib/menu_scanSchedule.php (modified) (2 diffs)
-
tags/6.0.6/lib/menu_twoFactor.php (modified) (2 diffs)
-
tags/6.0.6/lib/wfAPI.php (copied) (copied from wordfence/trunk/lib/wfAPI.php)
-
tags/6.0.6/lib/wfActivityReport.php (modified) (3 diffs)
-
tags/6.0.6/lib/wfBrowscapCache.php (copied) (copied from wordfence/trunk/lib/wfBrowscapCache.php)
-
tags/6.0.6/lib/wfConfig.php (copied) (copied from wordfence/trunk/lib/wfConfig.php)
-
tags/6.0.6/lib/wfLog.php (copied) (copied from wordfence/trunk/lib/wfLog.php) (1 diff)
-
tags/6.0.6/lib/wfScan.php (copied) (copied from wordfence/trunk/lib/wfScan.php)
-
tags/6.0.6/lib/wfScanEngine.php (copied) (copied from wordfence/trunk/lib/wfScanEngine.php) (3 diffs)
-
tags/6.0.6/lib/wfUpdateCheck.php (copied) (copied from wordfence/trunk/lib/wfUpdateCheck.php)
-
tags/6.0.6/lib/wfUtils.php (copied) (copied from wordfence/trunk/lib/wfUtils.php)
-
tags/6.0.6/lib/wordfenceClass.php (copied) (copied from wordfence/trunk/lib/wordfenceClass.php) (7 diffs)
-
tags/6.0.6/lib/wordfenceHash.php (copied) (copied from wordfence/trunk/lib/wordfenceHash.php)
-
tags/6.0.6/lib/wordfenceScanner.php (copied) (copied from wordfence/trunk/lib/wordfenceScanner.php)
-
tags/6.0.6/readme.txt (copied) (copied from wordfence/trunk/readme.txt) (2 diffs)
-
tags/6.0.6/views/reports/activity-report-email-inline.php (modified) (1 diff)
-
tags/6.0.6/views/reports/activity-report-email.php (modified) (1 diff)
-
tags/6.0.6/views/reports/activity-report.php (modified) (1 diff)
-
tags/6.0.6/wordfence.php (copied) (copied from wordfence/trunk/wordfence.php) (2 diffs)
-
trunk/js/admin.js (modified) (2 diffs)
-
trunk/lib/email_genericAlert.php (modified) (1 diff)
-
trunk/lib/email_newIssues.php (modified) (1 diff)
-
trunk/lib/email_passwdChanged.php (modified) (1 diff)
-
trunk/lib/email_pleaseChangePasswd.php (modified) (1 diff)
-
trunk/lib/menu_countryBlocking.php (modified) (3 diffs)
-
trunk/lib/menu_options.php (modified) (4 diffs)
-
trunk/lib/menu_passwd.php (modified) (2 diffs)
-
trunk/lib/menu_scan.php (modified) (2 diffs)
-
trunk/lib/menu_scanSchedule.php (modified) (2 diffs)
-
trunk/lib/menu_twoFactor.php (modified) (2 diffs)
-
trunk/lib/wfActivityReport.php (modified) (3 diffs)
-
trunk/lib/wfLog.php (modified) (1 diff)
-
trunk/lib/wfScanEngine.php (modified) (3 diffs)
-
trunk/lib/wordfenceClass.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/views/reports/activity-report-email-inline.php (modified) (1 diff)
-
trunk/views/reports/activity-report-email.php (modified) (1 diff)
-
trunk/views/reports/activity-report.php (modified) (1 diff)
-
trunk/wordfence.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wordfence/tags/6.0.6/js/admin.js
r1172235 r1177050 1685 1685 }, 1686 1686 invalidCountryURLMsg: function(URL) { 1687 this.colorbox('400px', "Invalid URL", "URL's that you provide for bypassing country blocking must start with '/' or 'http://' without quotes. The URL that is invalid is: " + URL);1687 this.colorbox('400px', "Invalid URL", "URL's that you provide for bypassing country blocking must start with '/' or 'http://' without quotes. The URL that is invalid is: " + this.htmlEscape(URL)); 1688 1688 return; 1689 1689 }, … … 2033 2033 // Older versions of Opera 2034 2034 return this._windowHasFocus; 2035 }, 2036 2037 htmlEscape: function(html) { 2038 return String(html) 2039 .replace(/&/g, '&') 2040 .replace(/"/g, '"') 2041 .replace(/'/g, ''') 2042 .replace(/</g, '<') 2043 .replace(/>/g, '>'); 2035 2044 } 2036 2045 }; -
wordfence/tags/6.0.6/lib/email_genericAlert.php
r1076331 r1177050 17 17 18 18 Click here to sign-up for the Premium version of Wordfence now. 19 https://www.wordfence.com/ wordfence-signup/19 https://www.wordfence.com/zz1/wordfence-signup/ 20 20 21 21 <?php } ?> -
wordfence/tags/6.0.6/lib/email_newIssues.php
r1070802 r1177050 36 36 37 37 <p>Click here to sign-up for the Premium version of Wordfence now.<br> 38 <a href="https://www.wordfence.com/ wordfence-signup/">https://www.wordfence.com/wordfence-signup/</a></p>38 <a href="https://www.wordfence.com/zz2/wordfence-signup/">https://www.wordfence.com/zz2/wordfence-signup/</a></p> 39 39 40 40 <?php } ?> -
wordfence/tags/6.0.6/lib/email_passwdChanged.php
r1128972 r1177050 21 21 Thank you. 22 22 23 Email generated by Wordfence. Learn more at http://www.wordfence.com/ 23 Email generated by Wordfence. Learn more at http://www.wordfence.com/zz3/ -
wordfence/tags/6.0.6/lib/email_pleaseChangePasswd.php
r1128972 r1177050 21 21 Thank you. 22 22 23 Email generated by Wordfence. Learn more at http://www.wordfence.com/ 23 Email generated by Wordfence. Learn more at http://www.wordfence.com/zz4/ -
wordfence/tags/6.0.6/lib/menu_countryBlocking.php
r1128972 r1177050 13 13 <strong>Country Blocking is only available to Premium Members at this time</strong><br /><br /> 14 14 Country Blocking is a premium feature because we have licensed a very accurate commercial geolocation database to provide this feature. If you would like to 15 activate this feature, simply <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. You can <a href="http://docs.wordfence.com/en/Country_blocking" target="_blank">learn more about Country Blocking on our documentation website</a>.15 activate this feature, simply <a href="https://www.wordfence.com/gnl1countryBlock1/wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. You can <a href="http://docs.wordfence.com/en/Country_blocking" target="_blank">learn more about Country Blocking on our documentation website</a>. 16 16 </div> 17 17 <?php } ?> … … 53 53 <tr><th colspan="2"> 54 54 If user who is allowed to access the site views the URL 55 <input type="text" id="wfBypassViewURL" value="<?php echo wp_kses(wfConfig::get('cbl_bypassViewURL', ""), array()); ?>" size="20" />55 <input type="text" id="wfBypassViewURL" value="<?php echo esc_attr(wfConfig::get('cbl_bypassViewURL', ""), array()); ?>" size="20" /> 56 56 then set a cookie that will bypass country blocking in future in case that user hits the site from a blocked country. 57 57 </th></tr> … … 114 114 ?> 115 115 If you would like access to this premium feature, please 116 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to our premium version</a>.116 <a href="https://www.wordfence.com/gnl1countryBlock2/wordfence-signup/" target="_blank">upgrade to our premium version</a>. 117 117 </p> 118 118 <?php -
wordfence/tags/6.0.6/lib/menu_options.php
r1172235 r1177050 39 39 <?php } else { ?> 40 40 The currently active API Key is a <span style="color: #F00; font-weight: bold;">Free Key</span>. <a 41 href="https://www.wordfence.com/ wordfence-signup/" target="_blank">Click Here to Upgrade to41 href="https://www.wordfence.com/gnl1optAPIKey1/wordfence-signup/" target="_blank">Click Here to Upgrade to 42 42 Wordfence Premium now.</a> 43 43 <?php } ?> … … 49 49 <table border="0"> 50 50 <tr> 51 <td><a href="https://www.wordfence.com/ manage-wordfence-api-keys/"51 <td><a href="https://www.wordfence.com/gnl1optMngKys/manage-wordfence-api-keys/" 52 52 target="_blank"><input type="button" value="Renew your premium license"/></a> 53 53 </td> … … 412 412 href="http://docs.wordfence.com/en/Wordfence_options#Scan_public_facing_site" 413 413 target="_blank" class="wfhelp"></a>(<a 414 href="https://www.wordfence.com/ wordfence-signup/" target="_blank">Paid members only</a>)414 href="https://www.wordfence.com/gnl1optPdOnly1/wordfence-signup/" target="_blank">Paid members only</a>) 415 415 </th> 416 416 <td><input type="checkbox" id="scansEnabled_public" class="wfConfigElem" … … 1075 1075 If you use the free edition of Wordfence, you don't need to worry about entering an API key in the "API Key" 1076 1076 field above. One is automatically created for you. If you choose to <a 1077 href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to Wordfence Premium1077 href="https://www.wordfence.com/gnl1optUpg1/wordfence-signup/" target="_blank">upgrade to Wordfence Premium 1078 1078 edition</a>, you will receive an API key. You will need to copy and paste that key into the "API Key" 1079 1079 field above and hit "Save" to activate your key. -
wordfence/tags/6.0.6/lib/menu_passwd.php
r1128972 r1177050 13 13 We then provide a way to change weak passwords or alert members that they need to improve their password strength. 14 14 To activate this feature, simply 15 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. You can15 <a href="https://www.wordfence.com/gnl1pwAuditUp1/wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. You can 16 16 <a href="http://docs.wordfence.com/en/Wordfence_Password_Auditing" target="_blank">learn more about Password Auditing on our Documentation Website</a>. 17 17 </div> … … 178 178 ?> 179 179 If you would like access to this premium feature, please 180 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to our premium version</a>.180 <a href="https://www.wordfence.com/gnl1pwAuditUp2/wordfence-signup/" target="_blank">upgrade to our premium version</a>. 181 181 </p> 182 182 <?php -
wordfence/tags/6.0.6/lib/menu_scan.php
r1164420 r1177050 13 13 <td> 14 14 <div style="border: 1px solid #CCC; padding: 4px;"> 15 <a href="http://docs.wordfence.com/en/Wordfence_scanning" target="_blank" class="wfhelp"></a><a href="http://docs.wordfence.com/en/Wordfence_scanning" target="_blank">Read our scanning documentation</a>. You can also <a href="#" onclick="WFAD.startTourAgain(); return false;">start the tour again</a>, <a href="http://www.wordfence.com/ subscribe-to-the-wordfence-email-list/" target="_blank">subscribe to get WordPress Security Alerts and Product News</a> or <a target="_blank" href="http://support.wordfence.com/">visit our support website help.</a> Love Wordfence? You can help by doing two simple things: <a href="http://wordpress.org/extend/plugins/wordfence/" target="_blank">Go to WordPress.org now and give this plugin a 5★ rating</a>. Blog about Wordfence and link to the <a href="http://wordpress.org/extend/plugins/wordfence/" target="_blank">plugin page</a> or <a href="http://www.wordfence.com/" target="_blank">www.wordfence.com</a>. Spreading the word helps us keep the best features free.15 <a href="http://docs.wordfence.com/en/Wordfence_scanning" target="_blank" class="wfhelp"></a><a href="http://docs.wordfence.com/en/Wordfence_scanning" target="_blank">Read our scanning documentation</a>. You can also <a href="#" onclick="WFAD.startTourAgain(); return false;">start the tour again</a>, <a href="http://www.wordfence.com/gnl1listSubscr/subscribe-to-the-wordfence-email-list/" target="_blank">subscribe to get WordPress Security Alerts and Product News</a> or <a target="_blank" href="http://support.wordfence.com/">visit our support website help.</a> Love Wordfence? You can help by doing two simple things: <a href="http://wordpress.org/extend/plugins/wordfence/" target="_blank">Go to WordPress.org now and give this plugin a 5★ rating</a>. Blog about Wordfence and link to the <a href="http://wordpress.org/extend/plugins/wordfence/" target="_blank">plugin page</a> or <a href="http://www.wordfence.com/gnl1scanTopHome/" target="_blank">www.wordfence.com</a>. Spreading the word helps us keep the best features free. 16 16 </div> 17 17 </td> … … 40 40 <?php } else { ?> 41 41 <div style="margin: 0 0 20px 5px; width: 795px;"> 42 <strong style="color: #F00;">How to upgrade:</strong> If you would like access to our <a href="http://support.wordfence.com/" target="_blank">Premium Support help system</a> and features like Cellphone Sign-in, Country Blocking, external site scanning and the ability to schedule scans, simply <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">visit our Wordfence Premium sign-up page</a> and sign up for a Premium Wordfence API key. Then go to the Wordfence options page on this site and replace your free API key with your new premium key. You will immediately be upgraded to Wordfence Premium with all the features it includes and you will have instant access to our ticketing system on <a href="http://support.wordfence.com/" target="_blank">support.wordfence.com</a>.42 <strong style="color: #F00;">How to upgrade:</strong> If you would like access to our <a href="http://support.wordfence.com/" target="_blank">Premium Support help system</a> and features like Cellphone Sign-in, Country Blocking, external site scanning and the ability to schedule scans, simply <a href="https://www.wordfence.com/gnl1scanUpgrade/wordfence-signup/" target="_blank">visit our Wordfence Premium sign-up page</a> and sign up for a Premium Wordfence API key. Then go to the Wordfence options page on this site and replace your free API key with your new premium key. You will immediately be upgraded to Wordfence Premium with all the features it includes and you will have instant access to our ticketing system on <a href="http://support.wordfence.com/" target="_blank">support.wordfence.com</a>. 43 43 </div> 44 44 -
wordfence/tags/6.0.6/lib/menu_scanSchedule.php
r1023626 r1177050 7 7 <strong>Scan Scheduling is only available to Premium Members at this time</strong><br /><br /> 8 8 Scan Scheduling is a premium feature because it places additional load on our scanning servers. If you would like to 9 activate this feature, simply <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options9 activate this feature, simply <a href="https://www.wordfence.com/gnl1scanSched1/wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options 10 10 page. 11 11 </div> … … 93 93 ?> 94 94 If you would like access to this premium feature, please 95 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to our Premium version</a>.95 <a href="https://www.wordfence.com/gnl1scanSched2/wordfence-signup/" target="_blank">upgrade to our Premium version</a>. 96 96 </p> 97 97 <?php -
wordfence/tags/6.0.6/lib/menu_twoFactor.php
r1023626 r1177050 7 7 <strong>Cellphone Sign-in is only available to Premium Members at this time</strong><br /><br /> 8 8 Cellphone Sign-in is a premium feature because we are charged per SMS we send when a user signs in. If you would like to 9 activate this feature, simply <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page.9 activate this feature, simply <a href="https://www.wordfence.com/gnl1twoFac1/wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. 10 10 <br /><br /> 11 11 Wordfence's Cellphone Sign-in uses a technique called "Two Factor Authentication" which is used by banks, government agencies and military world-wide as one of the most secure forms of remote system authentication. It's now available from Wordfence for your WordPress website. We recommend you enable Cellphone Sign-in for all Administrator level accounts. You can <a href="http://docs.wordfence.com/en/Cellphone_sign-in" target="_blank">learn more about Cellphone Sign-in on our documentation website</a>. … … 79 79 ?> 80 80 If you would like access to this premium feature, please 81 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to our premium version</a>.81 <a href="https://www.wordfence.com/gnl1twoFac2/wordfence-signup/" target="_blank">upgrade to our premium version</a>. 82 82 <?php 83 83 } -
wordfence/tags/6.0.6/lib/wfActivityReport.php
r1164420 r1177050 346 346 global $wpdb; 347 347 348 $is_bin_ip = !wfUtils::isValidIP($ip_address); 349 if (!$is_bin_ip) { 350 $ip_address = wfUtils::inet_pton($ip_address); 348 if (wfUtils::isValidIP($ip_address)) { 349 $ip_bin = wfUtils::inet_pton($ip_address); 350 } else { 351 $ip_bin = $ip_address; 352 $ip_address = wfUtils::inet_ntop($ip_bin); 351 353 } 352 354 … … 358 360 } 359 361 360 $country = wfUtils::IP2Country($i s_bin_ip ? wfUtils::inet_ntop($ip_address) : $ip_address);362 $country = wfUtils::IP2Country($ip_address); 361 363 362 364 $wpdb->query($wpdb->prepare(<<<SQL … … 365 367 ON DUPLICATE KEY UPDATE blockCount = blockCount + 1 366 368 SQL 367 , $ip_ address, $country));369 , $ip_bin, $country)); 368 370 } 369 371 -
wordfence/tags/6.0.6/lib/wfLog.php
r1172235 r1177050 791 791 //End range/UA blocking 792 792 793 $blockedCountries = wfConfig::get('cbl_countries', false); 794 $bareRequestURI = wfUtils::extractBareURI($_SERVER['REQUEST_URI']); 795 $bareBypassRedirURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassRedirURL', '')); 796 $skipCountryBlocking = false; 797 798 if($bareBypassRedirURI && $bareRequestURI == $bareBypassRedirURI){ //Run this before country blocking because even if the user isn't blocked we need to set the bypass cookie so they can bypass future blocks. 799 $bypassRedirDest = wfConfig::get('cbl_bypassRedirDest', ''); 800 if($bypassRedirDest){ 793 // Country blocking 794 if (wfConfig::get('isPaid')) { 795 $blockedCountries = wfConfig::get('cbl_countries', false); 796 $bareRequestURI = wfUtils::extractBareURI($_SERVER['REQUEST_URI']); 797 $bareBypassRedirURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassRedirURL', '')); 798 $skipCountryBlocking = false; 799 800 if($bareBypassRedirURI && $bareRequestURI == $bareBypassRedirURI){ //Run this before country blocking because even if the user isn't blocked we need to set the bypass cookie so they can bypass future blocks. 801 $bypassRedirDest = wfConfig::get('cbl_bypassRedirDest', ''); 802 if($bypassRedirDest){ 803 self::setCBLCookieBypass(); 804 $this->redirect($bypassRedirDest); //exits 805 } 806 } 807 $bareBypassViewURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassViewURL', '')); 808 if($bareBypassViewURI && $bareBypassViewURI == $bareRequestURI){ 801 809 self::setCBLCookieBypass(); 802 $this->redirect($bypassRedirDest); //exits 803 } 804 } 805 $bareBypassViewURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassViewURL', '')); 806 if($bareBypassViewURI && $bareBypassViewURI == $bareRequestURI){ 807 self::setCBLCookieBypass(); 808 $skipCountryBlocking = true; 809 } 810 811 if((! $skipCountryBlocking) && $blockedCountries && wfConfig::get('isPaid') && (! self::isCBLBypassCookieSet()) ){ 812 if(is_user_logged_in() && (! wfConfig::get('cbl_loggedInBlocked', false)) ){ //User is logged in and we're allowing logins 813 //Do nothing 814 } else if(strpos($_SERVER['REQUEST_URI'], '/wp-login.php') !== false && (! wfConfig::get('cbl_loginFormBlocked', false)) ){ //It's the login form and we're allowing that 815 //Do nothing 816 } else if(strpos($_SERVER['REQUEST_URI'], '/wp-login.php') === false && (! wfConfig::get('cbl_restOfSiteBlocked', false)) ){ //It's the rest of the site and we're allowing that 817 //Do nothing 818 } else { 819 if($country = wfUtils::IP2Country($IP) ){ 820 foreach(explode(',', $blockedCountries) as $blocked){ 821 if(strtoupper($blocked) == strtoupper($country)){ //At this point we know the user has been blocked 822 if(wfConfig::get('cbl_action') == 'redir'){ 823 $redirURL = wfConfig::get('cbl_redirURL'); 824 $eRedirHost = wfUtils::extractHostname($redirURL); 825 $isExternalRedir = false; 826 if($eRedirHost && $eRedirHost != wfUtils::extractHostname(home_url())){ //It's an external redirect... 827 $isExternalRedir = true; 810 $skipCountryBlocking = true; 811 } 812 813 if((! $skipCountryBlocking) && $blockedCountries && (! self::isCBLBypassCookieSet()) ){ 814 if(is_user_logged_in() && (! wfConfig::get('cbl_loggedInBlocked', false)) ){ //User is logged in and we're allowing logins 815 //Do nothing 816 } else if(strpos($_SERVER['REQUEST_URI'], '/wp-login.php') !== false && (! wfConfig::get('cbl_loginFormBlocked', false)) ){ //It's the login form and we're allowing that 817 //Do nothing 818 } else if(strpos($_SERVER['REQUEST_URI'], '/wp-login.php') === false && (! wfConfig::get('cbl_restOfSiteBlocked', false)) ){ //It's the rest of the site and we're allowing that 819 //Do nothing 820 } else { 821 if($country = wfUtils::IP2Country($IP) ){ 822 foreach(explode(',', $blockedCountries) as $blocked){ 823 if(strtoupper($blocked) == strtoupper($country)){ //At this point we know the user has been blocked 824 if(wfConfig::get('cbl_action') == 'redir'){ 825 $redirURL = wfConfig::get('cbl_redirURL'); 826 $eRedirHost = wfUtils::extractHostname($redirURL); 827 $isExternalRedir = false; 828 if($eRedirHost && $eRedirHost != wfUtils::extractHostname(home_url())){ //It's an external redirect... 829 $isExternalRedir = true; 830 } 831 if( (! $isExternalRedir) && wfUtils::extractBareURI($redirURL) == $bareRequestURI){ //Is this the URI we want to redirect to, then don't block it 832 //Do nothing 833 /* Uncomment the following if page components aren't loading for the page we redirect to. 834 Uncommenting is not recommended because it means that anyone from a blocked country 835 can crawl your site by sending the page blocked users are redirected to as the referer for every request. 836 But it's your call. 837 } else if(wfUtils::extractBareURI($_SERVER['HTTP_REFERER']) == $redirURL){ //If the referer the page we want to redirect to? Then this might be loading as a component so don't block. 838 //Do nothing 839 */ 840 } else { 841 $this->redirect(wfConfig::get('cbl_redirURL')); 842 } 843 } else { 844 $this->do503(3600, "Access from your area has been temporarily limited for security reasons"); 845 wfConfig::inc('totalCountryBlocked'); 828 846 } 829 if( (! $isExternalRedir) && wfUtils::extractBareURI($redirURL) == $bareRequestURI){ //Is this the URI we want to redirect to, then don't block it830 //Do nothing831 /* Uncomment the following if page components aren't loading for the page we redirect to.832 Uncommenting is not recommended because it means that anyone from a blocked country833 can crawl your site by sending the page blocked users are redirected to as the referer for every request.834 But it's your call.835 } else if(wfUtils::extractBareURI($_SERVER['HTTP_REFERER']) == $redirURL){ //If the referer the page we want to redirect to? Then this might be loading as a component so don't block.836 //Do nothing837 */838 } else {839 $this->redirect(wfConfig::get('cbl_redirURL'));840 }841 } else {842 $this->do503(3600, "Access from your area has been temporarily limited for security reasons");843 wfConfig::inc('totalCountryBlocked');844 847 } 845 848 } -
wordfence/tags/6.0.6/lib/wfScanEngine.php
r1172235 r1177050 68 68 $this->jobList[] = 'knownFiles_main'; 69 69 $this->jobList[] = 'knownFiles_finish'; 70 foreach(array('knownFiles', 'fileContents', 'database', 'posts', 'comments', 'passwds', 'dns', 'diskSpace', 'oldVersions') as $scanType){ 71 if(wfConfig::get('scansEnabled_' . $scanType)){ 72 if(method_exists($this, 'scan_' . $scanType . '_init')){ 73 foreach(array('init', 'main', 'finish') as $op){ $this->jobList[] = $scanType . '_' . $op; }; 74 } else { 70 foreach (array('knownFiles', 'fileContents', 'database', 'posts', 'comments', 'passwds', 'dns', 'diskSpace', 'oldVersions') as $scanType) { 71 if (wfConfig::get('scansEnabled_' . $scanType)) { 72 if (method_exists($this, 'scan_' . $scanType . '_init')) { 73 foreach (array('init', 'main', 'finish') as $op) { 74 $this->jobList[] = $scanType . '_' . $op; 75 }; 76 } else if (method_exists($this, 'scan_' . $scanType)) { 75 77 $this->jobList[] = $scanType; 76 78 } … … 124 126 self::checkForKill(); 125 127 $jobName = $this->jobList[0]; 126 call_user_func(array($this, 'scan_' . $jobName)); 128 $callback = array($this, 'scan_' . $jobName); 129 if (is_callable($callback)) { 130 call_user_func($callback); 131 } 127 132 array_shift($this->jobList); //only shift once we're done because we may pause halfway through a job and need to pick up where we left off 128 133 self::checkForKill(); … … 812 817 $this->status(2, 'info', "Starting DNS scan for $host"); 813 818 814 $cnameArrRec = dns_get_record($host, DNS_CNAME);819 $cnameArrRec = @dns_get_record($host, DNS_CNAME); 815 820 $cnameArr = array(); 816 821 $cnamesWeMustTrack = array(); 817 foreach($cnameArrRec as $elem){ 818 $this->status(2, 'info', "Scanning CNAME DNS record for " . $elem['host']); 819 if($elem['host'] == $host){ 820 $cnameArr[] = $elem; 821 $cnamesWeMustTrack[] = $elem['target']; 822 } 823 } 822 if ($cnameArrRec) { 823 foreach($cnameArrRec as $elem){ 824 $this->status(2, 'info', "Scanning CNAME DNS record for " . $elem['host']); 825 if($elem['host'] == $host){ 826 $cnameArr[] = $elem; 827 $cnamesWeMustTrack[] = $elem['target']; 828 } 829 } 830 } 831 824 832 function wfAnonFunc1($a){ return $a['host'] . ' points to ' . $a['target']; } 825 833 $cnameArr = array_map('wfAnonFunc1', $cnameArr); -
wordfence/tags/6.0.6/lib/wordfenceClass.php
r1172257 r1177050 329 329 $db->queryWriteIgnoreError("drop table if exists $prefix"."wfFileQueue"); 330 330 $db->queryWriteIgnoreError("drop table if exists $prefix"."wfFileChanges"); 331 //Adding primary key to this table because some backup apps use primary key during backup. 332 $db->queryWriteIgnoreError("alter table {$prefix}wfStatus add id bigint UNSIGNED NOT NULL auto_increment PRIMARY KEY"); 331 332 $result = $wpdb->get_row("SHOW FIELDS FROM {$prefix}wfStatus where field = 'id'"); 333 if (!$result || strtolower($result->Key) != 'pri') { 334 //Adding primary key to this table because some backup apps use primary key during backup. 335 $db->queryWriteIgnoreError("alter table {$prefix}wfStatus add id bigint UNSIGNED NOT NULL auto_increment PRIMARY KEY"); 336 } 333 337 334 338 $optScanEnabled = $db->querySingle("select val from $prefix"."wfConfig where name='scansEnabled_options'"); … … 388 392 } 389 393 394 // Fix the data in the country column. 395 // TODO: add version check so this doesn't run on every update. 396 $ip_results = $wpdb->get_results("SELECT * FROM `{$prefix}wfBlockedIPLog` GROUP BY IP"); 397 if ($ip_results) { 398 foreach ($ip_results as $ip_row) { 399 $wpdb->query($wpdb->prepare("UPDATE `{$prefix}wfBlockedIPLog` SET countryCode = %s WHERE IP = %s", wfUtils::IP2Country(wfUtils::inet_ntop($ip_row->IP)), $ip_row->IP)); 400 } 401 } 402 390 403 //Must be the final line 391 404 } … … 505 518 506 519 // Change GoDaddy's limit login mu-plugin since it can interfere with the two factor auth message. 507 if (defined('GD_SYSTEM_PLUGIN_DIR') && file_exists(GD_SYSTEM_PLUGIN_DIR . 'limit-login-attempts/limit-login-attempts.php') 508 && defined('LIMIT_LOGIN_DIRECT_ADDR')) { 520 if (self::hasGDLimitLoginsMUPlugin()) { 509 521 add_action('login_errors', array('wordfence', 'fixGDLimitLoginsErrors'), 11); 510 522 } … … 585 597 if($UA){ 586 598 $b = $browscap->getBrowser($UA); 587 if( $b['Crawler']){599 if(!empty($b['Crawler'])){ 588 600 $isCrawler = true; 589 601 } … … 879 891 } else if($_POST['wordfence_authFactor'] == $t[2]){ 880 892 $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); 881 $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $t[1]) ); 882 if(isset($codeResult['notPaid']) && $codeResult['notPaid']){ 883 break; //Let them sign in without two factor 884 } 885 if(isset($codeResult['ok']) && $codeResult['ok']){ 886 $t[2] = $codeResult['code']; 887 $t[4] = time() + 1800; //30 minutes until code expires 888 wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); //save the code the user needs to enter and return an error. 889 self::$authError = new WP_Error('twofactor_required', __('<strong>CODE EXPIRED. CHECK YOUR PHONE:</strong> The code you entered has expired. Codes are only valid for 30 minutes for security reasons. We have sent you a new code. Please sign in using your username and your password followed by a space and the new code we sent you.')); 890 return self::$authError; 891 } else { 892 break; //No new code was received. Let them sign in with the expired code. 893 try { 894 $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $t[1]) ); 895 896 if(isset($codeResult['notPaid']) && $codeResult['notPaid']){ 897 break; //Let them sign in without two factor 898 } 899 if(isset($codeResult['ok']) && $codeResult['ok']){ 900 $t[2] = $codeResult['code']; 901 $t[4] = time() + 1800; //30 minutes until code expires 902 wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); //save the code the user needs to enter and return an error. 903 self::$authError = new WP_Error('twofactor_required', __('<strong>CODE EXPIRED. CHECK YOUR PHONE:</strong> The code you entered has expired. Codes are only valid for 30 minutes for security reasons. We have sent you a new code. Please sign in using your username and your password followed by a space and the new code we sent you.')); 904 return self::$authError; 905 } else { 906 break; //No new code was received. Let them sign in with the expired code. 907 } 908 909 } catch (Exception $e) { 910 // Couldn't connect to noc1, let them sign in since the password was correct. 911 break; 893 912 } 894 913 } else { //Bad code, so cancel the login and return an error to user. … … 902 921 if($t[0] == $userDat->ID && $t[3] == 'activated'){ //Yup, enabled, so lets send the code 903 922 $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); 904 $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $t[1]) ); 905 if(isset($codeResult['notPaid']) && $codeResult['notPaid']){ 906 break; //Let them sign in without two factor if their API key has expired or they're not paid and for some reason they have this set up. 923 try { 924 $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $t[1]) ); 925 if(isset($codeResult['notPaid']) && $codeResult['notPaid']){ 926 break; //Let them sign in without two factor if their API key has expired or they're not paid and for some reason they have this set up. 927 } 928 } catch (Exception $e) { 929 // Couldn't connect to noc1, let them sign in since the password was correct. 930 break; 907 931 } 908 909 932 if(isset($codeResult['ok']) && $codeResult['ok']){ 910 933 $t[2] = $codeResult['code']; 911 934 $t[4] = time() + 1800; //30 minutes until code expires 912 935 wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); //save the code the user needs to enter and return an error. 936 937 if (self::hasGDLimitLoginsMUPlugin() && function_exists('limit_login_get_address')) { 938 $retries = get_option('limit_login_retries', array()); 939 $ip = limit_login_get_address(); 940 941 if (!is_array($retries)) { 942 $retries = array(); 943 } 944 if (isset($retries[$ip]) && is_int($retries[$ip])) { 945 $retries[$ip]--; 946 } else { 947 $retries[$ip] = 0; 948 } 949 update_option('limit_login_retries', $retries); 950 } 951 913 952 self::$authError = new WP_Error( 'twofactor_required', __( '<strong>CHECK YOUR PHONE</strong>: A code has been sent to your phone and will arrive within 30 seconds. Please sign in again and add a space and the code to the end of your password.' ) ); 914 953 return self::$authError; … … 3283 3322 } 3284 3323 3324 /** 3325 * @return bool 3326 */ 3327 public static function hasGDLimitLoginsMUPlugin() { 3328 return defined('GD_SYSTEM_PLUGIN_DIR') && file_exists(GD_SYSTEM_PLUGIN_DIR . 'limit-login-attempts/limit-login-attempts.php') 3329 && defined('LIMIT_LOGIN_DIRECT_ADDR'); 3330 } 3331 3332 /** 3333 * @param string $content 3334 * @return string 3335 */ 3285 3336 public static function fixGDLimitLoginsErrors($content) { 3286 3337 if (self::$authError) { -
wordfence/tags/6.0.6/readme.txt
r1172257 r1177050 4 4 Requires at least: 3.9 5 5 Tested up to: 4.2.2 6 Stable tag: 6.0. 56 Stable tag: 6.0.6 7 7 8 8 Wordfence Security is a free enterprise class security and performance plugin that makes your site up to 50 times faster and more secure. … … 172 172 173 173 == Changelog == 174 175 = 6.0.6 = 176 * Improvement: Handled uncaught exception when noc1 is not available in 2FA. 177 * Improvement: Fixed issue with limit-logins mu-plugin on GoDaddy counting first login attempt in 2FA against total allowed login attempts. 178 * Fix: Fixed bug with IPs not resolving to countries when printable IP passed to logBlockedIP. 179 * Fix: Fixed issue with free users country blocking redirects working after downgrade. 180 * Fix: Encoded URL field in country blocking options. 181 * Fix: Added a check to verify field has not already been altered prior to calling ALTER in runInstall. 182 * Fix: Fixed issue with scan_options method being called after method has been removed. 183 * Fix: Fixed bug in scan when dns_get_record fails and error condition was not handled. 184 * Fix: Fixed PHP notice when 'Crawler' not included in browser pcap result. 174 185 175 186 = 6.0.5 = -
wordfence/tags/6.0.6/views/reports/activity-report-email-inline.php
r1164420 r1177050 120 120 <?php echo $title ?> 121 121 </div> 122 <a href="http://www.wordfence.com/ " style="font-size: 100%; vertical-align: baseline; outline: none; color: orange; text-decoration: none; margin: 0; padding: 0; border: 0;"><img src="http://www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt="" style="font-size: 100%; vertical-align: baseline; -ms-interpolation-mode: bicubic; outline: none; text-decoration: none; margin: 0; padding: 0; border: 0 none;" /></a>123 124 <p style="font-size: 100%; vertical-align: baseline; margin: 1em 0; padding: 0; border: 0;"> 125 This email was sent from your website <a href="<?php echo site_url() ?>"><?php echo site_url() ?></a> and is a summary of security related activity that Wordfence monitors for the period <?php printf('%s to %s', $report_start, $report_end) ?>. <?php if (!wfConfig::get('isPaid')): ?>NOTE: You are using the free version of Wordfence and are missing out on features like cellphone sign-in, country blocking and detecting if your site IP is sending spam. <a href="http://www.wordfence.com/ ?utm_source=plugin&utm_medium=UI&utm_campaign=summaryEmail">Click here to upgrade to Wordfence Premium now</a>.<?php endif ?>122 <a href="http://www.wordfence.com/zz5/" style="font-size: 100%; vertical-align: baseline; outline: none; color: orange; text-decoration: none; margin: 0; padding: 0; border: 0;"><img src="http://www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt="" style="font-size: 100%; vertical-align: baseline; -ms-interpolation-mode: bicubic; outline: none; text-decoration: none; margin: 0; padding: 0; border: 0 none;" /></a> 123 124 <p style="font-size: 100%; vertical-align: baseline; margin: 1em 0; padding: 0; border: 0;"> 125 This email was sent from your website <a href="<?php echo site_url() ?>"><?php echo site_url() ?></a> and is a summary of security related activity that Wordfence monitors for the period <?php printf('%s to %s', $report_start, $report_end) ?>. <?php if (!wfConfig::get('isPaid')): ?>NOTE: You are using the free version of Wordfence and are missing out on features like cellphone sign-in, country blocking and detecting if your site IP is sending spam. <a href="http://www.wordfence.com/zz6/">Click here to upgrade to Wordfence Premium now</a>.<?php endif ?> 126 126 </p> 127 127 -
wordfence/tags/6.0.6/views/reports/activity-report-email.php
r1164420 r1177050 296 296 Activity for week of<br> <strong><?php echo date_i18n(get_option('date_format')) ?></strong> 297 297 </div> 298 <a href="http://www.wordfence.com/ "><img src="http://www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt=""/></a>298 <a href="http://www.wordfence.com/zz7/"><img src="http://www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt=""/></a> 299 299 300 300 <h2>Top 10 IP's Blocked</h2> -
wordfence/tags/6.0.6/views/reports/activity-report.php
r1164420 r1177050 4 4 */ 5 5 ?> 6 <a href="//www.wordfence.com/ "><img src="//www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt=""/></a>6 <a href="//www.wordfence.com/zz8/"><img src="//www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt=""/></a> 7 7 8 8 <h2>Top <?php echo (int) $limit; ?> IP's Blocked</h2> -
wordfence/tags/6.0.6/wordfence.php
r1172257 r1177050 5 5 Description: Wordfence Security - Anti-virus, Firewall and High Speed Cache 6 6 Author: Wordfence 7 Version: 6.0. 57 Version: 6.0.6 8 8 Author URI: http://www.wordfence.com/ 9 9 */ … … 11 11 return; 12 12 } 13 define('WORDFENCE_VERSION', '6.0. 5');13 define('WORDFENCE_VERSION', '6.0.6'); 14 14 if(get_option('wordfenceActivated') != 1){ 15 15 add_action('activated_plugin','wordfence_save_activation_error'); function wordfence_save_activation_error(){ update_option('wf_plugin_act_error', ob_get_contents()); } -
wordfence/trunk/js/admin.js
r1172235 r1177050 1685 1685 }, 1686 1686 invalidCountryURLMsg: function(URL) { 1687 this.colorbox('400px', "Invalid URL", "URL's that you provide for bypassing country blocking must start with '/' or 'http://' without quotes. The URL that is invalid is: " + URL);1687 this.colorbox('400px', "Invalid URL", "URL's that you provide for bypassing country blocking must start with '/' or 'http://' without quotes. The URL that is invalid is: " + this.htmlEscape(URL)); 1688 1688 return; 1689 1689 }, … … 2033 2033 // Older versions of Opera 2034 2034 return this._windowHasFocus; 2035 }, 2036 2037 htmlEscape: function(html) { 2038 return String(html) 2039 .replace(/&/g, '&') 2040 .replace(/"/g, '"') 2041 .replace(/'/g, ''') 2042 .replace(/</g, '<') 2043 .replace(/>/g, '>'); 2035 2044 } 2036 2045 }; -
wordfence/trunk/lib/email_genericAlert.php
r1076331 r1177050 17 17 18 18 Click here to sign-up for the Premium version of Wordfence now. 19 https://www.wordfence.com/ wordfence-signup/19 https://www.wordfence.com/zz1/wordfence-signup/ 20 20 21 21 <?php } ?> -
wordfence/trunk/lib/email_newIssues.php
r1070802 r1177050 36 36 37 37 <p>Click here to sign-up for the Premium version of Wordfence now.<br> 38 <a href="https://www.wordfence.com/ wordfence-signup/">https://www.wordfence.com/wordfence-signup/</a></p>38 <a href="https://www.wordfence.com/zz2/wordfence-signup/">https://www.wordfence.com/zz2/wordfence-signup/</a></p> 39 39 40 40 <?php } ?> -
wordfence/trunk/lib/email_passwdChanged.php
r1128972 r1177050 21 21 Thank you. 22 22 23 Email generated by Wordfence. Learn more at http://www.wordfence.com/ 23 Email generated by Wordfence. Learn more at http://www.wordfence.com/zz3/ -
wordfence/trunk/lib/email_pleaseChangePasswd.php
r1128972 r1177050 21 21 Thank you. 22 22 23 Email generated by Wordfence. Learn more at http://www.wordfence.com/ 23 Email generated by Wordfence. Learn more at http://www.wordfence.com/zz4/ -
wordfence/trunk/lib/menu_countryBlocking.php
r1128972 r1177050 13 13 <strong>Country Blocking is only available to Premium Members at this time</strong><br /><br /> 14 14 Country Blocking is a premium feature because we have licensed a very accurate commercial geolocation database to provide this feature. If you would like to 15 activate this feature, simply <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. You can <a href="http://docs.wordfence.com/en/Country_blocking" target="_blank">learn more about Country Blocking on our documentation website</a>.15 activate this feature, simply <a href="https://www.wordfence.com/gnl1countryBlock1/wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. You can <a href="http://docs.wordfence.com/en/Country_blocking" target="_blank">learn more about Country Blocking on our documentation website</a>. 16 16 </div> 17 17 <?php } ?> … … 53 53 <tr><th colspan="2"> 54 54 If user who is allowed to access the site views the URL 55 <input type="text" id="wfBypassViewURL" value="<?php echo wp_kses(wfConfig::get('cbl_bypassViewURL', ""), array()); ?>" size="20" />55 <input type="text" id="wfBypassViewURL" value="<?php echo esc_attr(wfConfig::get('cbl_bypassViewURL', ""), array()); ?>" size="20" /> 56 56 then set a cookie that will bypass country blocking in future in case that user hits the site from a blocked country. 57 57 </th></tr> … … 114 114 ?> 115 115 If you would like access to this premium feature, please 116 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to our premium version</a>.116 <a href="https://www.wordfence.com/gnl1countryBlock2/wordfence-signup/" target="_blank">upgrade to our premium version</a>. 117 117 </p> 118 118 <?php -
wordfence/trunk/lib/menu_options.php
r1172235 r1177050 39 39 <?php } else { ?> 40 40 The currently active API Key is a <span style="color: #F00; font-weight: bold;">Free Key</span>. <a 41 href="https://www.wordfence.com/ wordfence-signup/" target="_blank">Click Here to Upgrade to41 href="https://www.wordfence.com/gnl1optAPIKey1/wordfence-signup/" target="_blank">Click Here to Upgrade to 42 42 Wordfence Premium now.</a> 43 43 <?php } ?> … … 49 49 <table border="0"> 50 50 <tr> 51 <td><a href="https://www.wordfence.com/ manage-wordfence-api-keys/"51 <td><a href="https://www.wordfence.com/gnl1optMngKys/manage-wordfence-api-keys/" 52 52 target="_blank"><input type="button" value="Renew your premium license"/></a> 53 53 </td> … … 412 412 href="http://docs.wordfence.com/en/Wordfence_options#Scan_public_facing_site" 413 413 target="_blank" class="wfhelp"></a>(<a 414 href="https://www.wordfence.com/ wordfence-signup/" target="_blank">Paid members only</a>)414 href="https://www.wordfence.com/gnl1optPdOnly1/wordfence-signup/" target="_blank">Paid members only</a>) 415 415 </th> 416 416 <td><input type="checkbox" id="scansEnabled_public" class="wfConfigElem" … … 1075 1075 If you use the free edition of Wordfence, you don't need to worry about entering an API key in the "API Key" 1076 1076 field above. One is automatically created for you. If you choose to <a 1077 href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to Wordfence Premium1077 href="https://www.wordfence.com/gnl1optUpg1/wordfence-signup/" target="_blank">upgrade to Wordfence Premium 1078 1078 edition</a>, you will receive an API key. You will need to copy and paste that key into the "API Key" 1079 1079 field above and hit "Save" to activate your key. -
wordfence/trunk/lib/menu_passwd.php
r1128972 r1177050 13 13 We then provide a way to change weak passwords or alert members that they need to improve their password strength. 14 14 To activate this feature, simply 15 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. You can15 <a href="https://www.wordfence.com/gnl1pwAuditUp1/wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. You can 16 16 <a href="http://docs.wordfence.com/en/Wordfence_Password_Auditing" target="_blank">learn more about Password Auditing on our Documentation Website</a>. 17 17 </div> … … 178 178 ?> 179 179 If you would like access to this premium feature, please 180 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to our premium version</a>.180 <a href="https://www.wordfence.com/gnl1pwAuditUp2/wordfence-signup/" target="_blank">upgrade to our premium version</a>. 181 181 </p> 182 182 <?php -
wordfence/trunk/lib/menu_scan.php
r1164420 r1177050 13 13 <td> 14 14 <div style="border: 1px solid #CCC; padding: 4px;"> 15 <a href="http://docs.wordfence.com/en/Wordfence_scanning" target="_blank" class="wfhelp"></a><a href="http://docs.wordfence.com/en/Wordfence_scanning" target="_blank">Read our scanning documentation</a>. You can also <a href="#" onclick="WFAD.startTourAgain(); return false;">start the tour again</a>, <a href="http://www.wordfence.com/ subscribe-to-the-wordfence-email-list/" target="_blank">subscribe to get WordPress Security Alerts and Product News</a> or <a target="_blank" href="http://support.wordfence.com/">visit our support website help.</a> Love Wordfence? You can help by doing two simple things: <a href="http://wordpress.org/extend/plugins/wordfence/" target="_blank">Go to WordPress.org now and give this plugin a 5★ rating</a>. Blog about Wordfence and link to the <a href="http://wordpress.org/extend/plugins/wordfence/" target="_blank">plugin page</a> or <a href="http://www.wordfence.com/" target="_blank">www.wordfence.com</a>. Spreading the word helps us keep the best features free.15 <a href="http://docs.wordfence.com/en/Wordfence_scanning" target="_blank" class="wfhelp"></a><a href="http://docs.wordfence.com/en/Wordfence_scanning" target="_blank">Read our scanning documentation</a>. You can also <a href="#" onclick="WFAD.startTourAgain(); return false;">start the tour again</a>, <a href="http://www.wordfence.com/gnl1listSubscr/subscribe-to-the-wordfence-email-list/" target="_blank">subscribe to get WordPress Security Alerts and Product News</a> or <a target="_blank" href="http://support.wordfence.com/">visit our support website help.</a> Love Wordfence? You can help by doing two simple things: <a href="http://wordpress.org/extend/plugins/wordfence/" target="_blank">Go to WordPress.org now and give this plugin a 5★ rating</a>. Blog about Wordfence and link to the <a href="http://wordpress.org/extend/plugins/wordfence/" target="_blank">plugin page</a> or <a href="http://www.wordfence.com/gnl1scanTopHome/" target="_blank">www.wordfence.com</a>. Spreading the word helps us keep the best features free. 16 16 </div> 17 17 </td> … … 40 40 <?php } else { ?> 41 41 <div style="margin: 0 0 20px 5px; width: 795px;"> 42 <strong style="color: #F00;">How to upgrade:</strong> If you would like access to our <a href="http://support.wordfence.com/" target="_blank">Premium Support help system</a> and features like Cellphone Sign-in, Country Blocking, external site scanning and the ability to schedule scans, simply <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">visit our Wordfence Premium sign-up page</a> and sign up for a Premium Wordfence API key. Then go to the Wordfence options page on this site and replace your free API key with your new premium key. You will immediately be upgraded to Wordfence Premium with all the features it includes and you will have instant access to our ticketing system on <a href="http://support.wordfence.com/" target="_blank">support.wordfence.com</a>.42 <strong style="color: #F00;">How to upgrade:</strong> If you would like access to our <a href="http://support.wordfence.com/" target="_blank">Premium Support help system</a> and features like Cellphone Sign-in, Country Blocking, external site scanning and the ability to schedule scans, simply <a href="https://www.wordfence.com/gnl1scanUpgrade/wordfence-signup/" target="_blank">visit our Wordfence Premium sign-up page</a> and sign up for a Premium Wordfence API key. Then go to the Wordfence options page on this site and replace your free API key with your new premium key. You will immediately be upgraded to Wordfence Premium with all the features it includes and you will have instant access to our ticketing system on <a href="http://support.wordfence.com/" target="_blank">support.wordfence.com</a>. 43 43 </div> 44 44 -
wordfence/trunk/lib/menu_scanSchedule.php
r1023626 r1177050 7 7 <strong>Scan Scheduling is only available to Premium Members at this time</strong><br /><br /> 8 8 Scan Scheduling is a premium feature because it places additional load on our scanning servers. If you would like to 9 activate this feature, simply <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options9 activate this feature, simply <a href="https://www.wordfence.com/gnl1scanSched1/wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options 10 10 page. 11 11 </div> … … 93 93 ?> 94 94 If you would like access to this premium feature, please 95 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to our Premium version</a>.95 <a href="https://www.wordfence.com/gnl1scanSched2/wordfence-signup/" target="_blank">upgrade to our Premium version</a>. 96 96 </p> 97 97 <?php -
wordfence/trunk/lib/menu_twoFactor.php
r1023626 r1177050 7 7 <strong>Cellphone Sign-in is only available to Premium Members at this time</strong><br /><br /> 8 8 Cellphone Sign-in is a premium feature because we are charged per SMS we send when a user signs in. If you would like to 9 activate this feature, simply <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page.9 activate this feature, simply <a href="https://www.wordfence.com/gnl1twoFac1/wordfence-signup/" target="_blank">click here and get a premium Wordfence API Key</a>, and then copy and paste it into your options page. 10 10 <br /><br /> 11 11 Wordfence's Cellphone Sign-in uses a technique called "Two Factor Authentication" which is used by banks, government agencies and military world-wide as one of the most secure forms of remote system authentication. It's now available from Wordfence for your WordPress website. We recommend you enable Cellphone Sign-in for all Administrator level accounts. You can <a href="http://docs.wordfence.com/en/Cellphone_sign-in" target="_blank">learn more about Cellphone Sign-in on our documentation website</a>. … … 79 79 ?> 80 80 If you would like access to this premium feature, please 81 <a href="https://www.wordfence.com/ wordfence-signup/" target="_blank">upgrade to our premium version</a>.81 <a href="https://www.wordfence.com/gnl1twoFac2/wordfence-signup/" target="_blank">upgrade to our premium version</a>. 82 82 <?php 83 83 } -
wordfence/trunk/lib/wfActivityReport.php
r1164420 r1177050 346 346 global $wpdb; 347 347 348 $is_bin_ip = !wfUtils::isValidIP($ip_address); 349 if (!$is_bin_ip) { 350 $ip_address = wfUtils::inet_pton($ip_address); 348 if (wfUtils::isValidIP($ip_address)) { 349 $ip_bin = wfUtils::inet_pton($ip_address); 350 } else { 351 $ip_bin = $ip_address; 352 $ip_address = wfUtils::inet_ntop($ip_bin); 351 353 } 352 354 … … 358 360 } 359 361 360 $country = wfUtils::IP2Country($i s_bin_ip ? wfUtils::inet_ntop($ip_address) : $ip_address);362 $country = wfUtils::IP2Country($ip_address); 361 363 362 364 $wpdb->query($wpdb->prepare(<<<SQL … … 365 367 ON DUPLICATE KEY UPDATE blockCount = blockCount + 1 366 368 SQL 367 , $ip_ address, $country));369 , $ip_bin, $country)); 368 370 } 369 371 -
wordfence/trunk/lib/wfLog.php
r1172235 r1177050 791 791 //End range/UA blocking 792 792 793 $blockedCountries = wfConfig::get('cbl_countries', false); 794 $bareRequestURI = wfUtils::extractBareURI($_SERVER['REQUEST_URI']); 795 $bareBypassRedirURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassRedirURL', '')); 796 $skipCountryBlocking = false; 797 798 if($bareBypassRedirURI && $bareRequestURI == $bareBypassRedirURI){ //Run this before country blocking because even if the user isn't blocked we need to set the bypass cookie so they can bypass future blocks. 799 $bypassRedirDest = wfConfig::get('cbl_bypassRedirDest', ''); 800 if($bypassRedirDest){ 793 // Country blocking 794 if (wfConfig::get('isPaid')) { 795 $blockedCountries = wfConfig::get('cbl_countries', false); 796 $bareRequestURI = wfUtils::extractBareURI($_SERVER['REQUEST_URI']); 797 $bareBypassRedirURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassRedirURL', '')); 798 $skipCountryBlocking = false; 799 800 if($bareBypassRedirURI && $bareRequestURI == $bareBypassRedirURI){ //Run this before country blocking because even if the user isn't blocked we need to set the bypass cookie so they can bypass future blocks. 801 $bypassRedirDest = wfConfig::get('cbl_bypassRedirDest', ''); 802 if($bypassRedirDest){ 803 self::setCBLCookieBypass(); 804 $this->redirect($bypassRedirDest); //exits 805 } 806 } 807 $bareBypassViewURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassViewURL', '')); 808 if($bareBypassViewURI && $bareBypassViewURI == $bareRequestURI){ 801 809 self::setCBLCookieBypass(); 802 $this->redirect($bypassRedirDest); //exits 803 } 804 } 805 $bareBypassViewURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassViewURL', '')); 806 if($bareBypassViewURI && $bareBypassViewURI == $bareRequestURI){ 807 self::setCBLCookieBypass(); 808 $skipCountryBlocking = true; 809 } 810 811 if((! $skipCountryBlocking) && $blockedCountries && wfConfig::get('isPaid') && (! self::isCBLBypassCookieSet()) ){ 812 if(is_user_logged_in() && (! wfConfig::get('cbl_loggedInBlocked', false)) ){ //User is logged in and we're allowing logins 813 //Do nothing 814 } else if(strpos($_SERVER['REQUEST_URI'], '/wp-login.php') !== false && (! wfConfig::get('cbl_loginFormBlocked', false)) ){ //It's the login form and we're allowing that 815 //Do nothing 816 } else if(strpos($_SERVER['REQUEST_URI'], '/wp-login.php') === false && (! wfConfig::get('cbl_restOfSiteBlocked', false)) ){ //It's the rest of the site and we're allowing that 817 //Do nothing 818 } else { 819 if($country = wfUtils::IP2Country($IP) ){ 820 foreach(explode(',', $blockedCountries) as $blocked){ 821 if(strtoupper($blocked) == strtoupper($country)){ //At this point we know the user has been blocked 822 if(wfConfig::get('cbl_action') == 'redir'){ 823 $redirURL = wfConfig::get('cbl_redirURL'); 824 $eRedirHost = wfUtils::extractHostname($redirURL); 825 $isExternalRedir = false; 826 if($eRedirHost && $eRedirHost != wfUtils::extractHostname(home_url())){ //It's an external redirect... 827 $isExternalRedir = true; 810 $skipCountryBlocking = true; 811 } 812 813 if((! $skipCountryBlocking) && $blockedCountries && (! self::isCBLBypassCookieSet()) ){ 814 if(is_user_logged_in() && (! wfConfig::get('cbl_loggedInBlocked', false)) ){ //User is logged in and we're allowing logins 815 //Do nothing 816 } else if(strpos($_SERVER['REQUEST_URI'], '/wp-login.php') !== false && (! wfConfig::get('cbl_loginFormBlocked', false)) ){ //It's the login form and we're allowing that 817 //Do nothing 818 } else if(strpos($_SERVER['REQUEST_URI'], '/wp-login.php') === false && (! wfConfig::get('cbl_restOfSiteBlocked', false)) ){ //It's the rest of the site and we're allowing that 819 //Do nothing 820 } else { 821 if($country = wfUtils::IP2Country($IP) ){ 822 foreach(explode(',', $blockedCountries) as $blocked){ 823 if(strtoupper($blocked) == strtoupper($country)){ //At this point we know the user has been blocked 824 if(wfConfig::get('cbl_action') == 'redir'){ 825 $redirURL = wfConfig::get('cbl_redirURL'); 826 $eRedirHost = wfUtils::extractHostname($redirURL); 827 $isExternalRedir = false; 828 if($eRedirHost && $eRedirHost != wfUtils::extractHostname(home_url())){ //It's an external redirect... 829 $isExternalRedir = true; 830 } 831 if( (! $isExternalRedir) && wfUtils::extractBareURI($redirURL) == $bareRequestURI){ //Is this the URI we want to redirect to, then don't block it 832 //Do nothing 833 /* Uncomment the following if page components aren't loading for the page we redirect to. 834 Uncommenting is not recommended because it means that anyone from a blocked country 835 can crawl your site by sending the page blocked users are redirected to as the referer for every request. 836 But it's your call. 837 } else if(wfUtils::extractBareURI($_SERVER['HTTP_REFERER']) == $redirURL){ //If the referer the page we want to redirect to? Then this might be loading as a component so don't block. 838 //Do nothing 839 */ 840 } else { 841 $this->redirect(wfConfig::get('cbl_redirURL')); 842 } 843 } else { 844 $this->do503(3600, "Access from your area has been temporarily limited for security reasons"); 845 wfConfig::inc('totalCountryBlocked'); 828 846 } 829 if( (! $isExternalRedir) && wfUtils::extractBareURI($redirURL) == $bareRequestURI){ //Is this the URI we want to redirect to, then don't block it830 //Do nothing831 /* Uncomment the following if page components aren't loading for the page we redirect to.832 Uncommenting is not recommended because it means that anyone from a blocked country833 can crawl your site by sending the page blocked users are redirected to as the referer for every request.834 But it's your call.835 } else if(wfUtils::extractBareURI($_SERVER['HTTP_REFERER']) == $redirURL){ //If the referer the page we want to redirect to? Then this might be loading as a component so don't block.836 //Do nothing837 */838 } else {839 $this->redirect(wfConfig::get('cbl_redirURL'));840 }841 } else {842 $this->do503(3600, "Access from your area has been temporarily limited for security reasons");843 wfConfig::inc('totalCountryBlocked');844 847 } 845 848 } -
wordfence/trunk/lib/wfScanEngine.php
r1172235 r1177050 68 68 $this->jobList[] = 'knownFiles_main'; 69 69 $this->jobList[] = 'knownFiles_finish'; 70 foreach(array('knownFiles', 'fileContents', 'database', 'posts', 'comments', 'passwds', 'dns', 'diskSpace', 'oldVersions') as $scanType){ 71 if(wfConfig::get('scansEnabled_' . $scanType)){ 72 if(method_exists($this, 'scan_' . $scanType . '_init')){ 73 foreach(array('init', 'main', 'finish') as $op){ $this->jobList[] = $scanType . '_' . $op; }; 74 } else { 70 foreach (array('knownFiles', 'fileContents', 'database', 'posts', 'comments', 'passwds', 'dns', 'diskSpace', 'oldVersions') as $scanType) { 71 if (wfConfig::get('scansEnabled_' . $scanType)) { 72 if (method_exists($this, 'scan_' . $scanType . '_init')) { 73 foreach (array('init', 'main', 'finish') as $op) { 74 $this->jobList[] = $scanType . '_' . $op; 75 }; 76 } else if (method_exists($this, 'scan_' . $scanType)) { 75 77 $this->jobList[] = $scanType; 76 78 } … … 124 126 self::checkForKill(); 125 127 $jobName = $this->jobList[0]; 126 call_user_func(array($this, 'scan_' . $jobName)); 128 $callback = array($this, 'scan_' . $jobName); 129 if (is_callable($callback)) { 130 call_user_func($callback); 131 } 127 132 array_shift($this->jobList); //only shift once we're done because we may pause halfway through a job and need to pick up where we left off 128 133 self::checkForKill(); … … 812 817 $this->status(2, 'info', "Starting DNS scan for $host"); 813 818 814 $cnameArrRec = dns_get_record($host, DNS_CNAME);819 $cnameArrRec = @dns_get_record($host, DNS_CNAME); 815 820 $cnameArr = array(); 816 821 $cnamesWeMustTrack = array(); 817 foreach($cnameArrRec as $elem){ 818 $this->status(2, 'info', "Scanning CNAME DNS record for " . $elem['host']); 819 if($elem['host'] == $host){ 820 $cnameArr[] = $elem; 821 $cnamesWeMustTrack[] = $elem['target']; 822 } 823 } 822 if ($cnameArrRec) { 823 foreach($cnameArrRec as $elem){ 824 $this->status(2, 'info', "Scanning CNAME DNS record for " . $elem['host']); 825 if($elem['host'] == $host){ 826 $cnameArr[] = $elem; 827 $cnamesWeMustTrack[] = $elem['target']; 828 } 829 } 830 } 831 824 832 function wfAnonFunc1($a){ return $a['host'] . ' points to ' . $a['target']; } 825 833 $cnameArr = array_map('wfAnonFunc1', $cnameArr); -
wordfence/trunk/lib/wordfenceClass.php
r1172257 r1177050 329 329 $db->queryWriteIgnoreError("drop table if exists $prefix"."wfFileQueue"); 330 330 $db->queryWriteIgnoreError("drop table if exists $prefix"."wfFileChanges"); 331 //Adding primary key to this table because some backup apps use primary key during backup. 332 $db->queryWriteIgnoreError("alter table {$prefix}wfStatus add id bigint UNSIGNED NOT NULL auto_increment PRIMARY KEY"); 331 332 $result = $wpdb->get_row("SHOW FIELDS FROM {$prefix}wfStatus where field = 'id'"); 333 if (!$result || strtolower($result->Key) != 'pri') { 334 //Adding primary key to this table because some backup apps use primary key during backup. 335 $db->queryWriteIgnoreError("alter table {$prefix}wfStatus add id bigint UNSIGNED NOT NULL auto_increment PRIMARY KEY"); 336 } 333 337 334 338 $optScanEnabled = $db->querySingle("select val from $prefix"."wfConfig where name='scansEnabled_options'"); … … 388 392 } 389 393 394 // Fix the data in the country column. 395 // TODO: add version check so this doesn't run on every update. 396 $ip_results = $wpdb->get_results("SELECT * FROM `{$prefix}wfBlockedIPLog` GROUP BY IP"); 397 if ($ip_results) { 398 foreach ($ip_results as $ip_row) { 399 $wpdb->query($wpdb->prepare("UPDATE `{$prefix}wfBlockedIPLog` SET countryCode = %s WHERE IP = %s", wfUtils::IP2Country(wfUtils::inet_ntop($ip_row->IP)), $ip_row->IP)); 400 } 401 } 402 390 403 //Must be the final line 391 404 } … … 505 518 506 519 // Change GoDaddy's limit login mu-plugin since it can interfere with the two factor auth message. 507 if (defined('GD_SYSTEM_PLUGIN_DIR') && file_exists(GD_SYSTEM_PLUGIN_DIR . 'limit-login-attempts/limit-login-attempts.php') 508 && defined('LIMIT_LOGIN_DIRECT_ADDR')) { 520 if (self::hasGDLimitLoginsMUPlugin()) { 509 521 add_action('login_errors', array('wordfence', 'fixGDLimitLoginsErrors'), 11); 510 522 } … … 585 597 if($UA){ 586 598 $b = $browscap->getBrowser($UA); 587 if( $b['Crawler']){599 if(!empty($b['Crawler'])){ 588 600 $isCrawler = true; 589 601 } … … 879 891 } else if($_POST['wordfence_authFactor'] == $t[2]){ 880 892 $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); 881 $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $t[1]) ); 882 if(isset($codeResult['notPaid']) && $codeResult['notPaid']){ 883 break; //Let them sign in without two factor 884 } 885 if(isset($codeResult['ok']) && $codeResult['ok']){ 886 $t[2] = $codeResult['code']; 887 $t[4] = time() + 1800; //30 minutes until code expires 888 wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); //save the code the user needs to enter and return an error. 889 self::$authError = new WP_Error('twofactor_required', __('<strong>CODE EXPIRED. CHECK YOUR PHONE:</strong> The code you entered has expired. Codes are only valid for 30 minutes for security reasons. We have sent you a new code. Please sign in using your username and your password followed by a space and the new code we sent you.')); 890 return self::$authError; 891 } else { 892 break; //No new code was received. Let them sign in with the expired code. 893 try { 894 $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $t[1]) ); 895 896 if(isset($codeResult['notPaid']) && $codeResult['notPaid']){ 897 break; //Let them sign in without two factor 898 } 899 if(isset($codeResult['ok']) && $codeResult['ok']){ 900 $t[2] = $codeResult['code']; 901 $t[4] = time() + 1800; //30 minutes until code expires 902 wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); //save the code the user needs to enter and return an error. 903 self::$authError = new WP_Error('twofactor_required', __('<strong>CODE EXPIRED. CHECK YOUR PHONE:</strong> The code you entered has expired. Codes are only valid for 30 minutes for security reasons. We have sent you a new code. Please sign in using your username and your password followed by a space and the new code we sent you.')); 904 return self::$authError; 905 } else { 906 break; //No new code was received. Let them sign in with the expired code. 907 } 908 909 } catch (Exception $e) { 910 // Couldn't connect to noc1, let them sign in since the password was correct. 911 break; 893 912 } 894 913 } else { //Bad code, so cancel the login and return an error to user. … … 902 921 if($t[0] == $userDat->ID && $t[3] == 'activated'){ //Yup, enabled, so lets send the code 903 922 $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); 904 $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $t[1]) ); 905 if(isset($codeResult['notPaid']) && $codeResult['notPaid']){ 906 break; //Let them sign in without two factor if their API key has expired or they're not paid and for some reason they have this set up. 923 try { 924 $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $t[1]) ); 925 if(isset($codeResult['notPaid']) && $codeResult['notPaid']){ 926 break; //Let them sign in without two factor if their API key has expired or they're not paid and for some reason they have this set up. 927 } 928 } catch (Exception $e) { 929 // Couldn't connect to noc1, let them sign in since the password was correct. 930 break; 907 931 } 908 909 932 if(isset($codeResult['ok']) && $codeResult['ok']){ 910 933 $t[2] = $codeResult['code']; 911 934 $t[4] = time() + 1800; //30 minutes until code expires 912 935 wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); //save the code the user needs to enter and return an error. 936 937 if (self::hasGDLimitLoginsMUPlugin() && function_exists('limit_login_get_address')) { 938 $retries = get_option('limit_login_retries', array()); 939 $ip = limit_login_get_address(); 940 941 if (!is_array($retries)) { 942 $retries = array(); 943 } 944 if (isset($retries[$ip]) && is_int($retries[$ip])) { 945 $retries[$ip]--; 946 } else { 947 $retries[$ip] = 0; 948 } 949 update_option('limit_login_retries', $retries); 950 } 951 913 952 self::$authError = new WP_Error( 'twofactor_required', __( '<strong>CHECK YOUR PHONE</strong>: A code has been sent to your phone and will arrive within 30 seconds. Please sign in again and add a space and the code to the end of your password.' ) ); 914 953 return self::$authError; … … 3283 3322 } 3284 3323 3324 /** 3325 * @return bool 3326 */ 3327 public static function hasGDLimitLoginsMUPlugin() { 3328 return defined('GD_SYSTEM_PLUGIN_DIR') && file_exists(GD_SYSTEM_PLUGIN_DIR . 'limit-login-attempts/limit-login-attempts.php') 3329 && defined('LIMIT_LOGIN_DIRECT_ADDR'); 3330 } 3331 3332 /** 3333 * @param string $content 3334 * @return string 3335 */ 3285 3336 public static function fixGDLimitLoginsErrors($content) { 3286 3337 if (self::$authError) { -
wordfence/trunk/readme.txt
r1172257 r1177050 4 4 Requires at least: 3.9 5 5 Tested up to: 4.2.2 6 Stable tag: 6.0. 56 Stable tag: 6.0.6 7 7 8 8 Wordfence Security is a free enterprise class security and performance plugin that makes your site up to 50 times faster and more secure. … … 172 172 173 173 == Changelog == 174 175 = 6.0.6 = 176 * Improvement: Handled uncaught exception when noc1 is not available in 2FA. 177 * Improvement: Fixed issue with limit-logins mu-plugin on GoDaddy counting first login attempt in 2FA against total allowed login attempts. 178 * Fix: Fixed bug with IPs not resolving to countries when printable IP passed to logBlockedIP. 179 * Fix: Fixed issue with free users country blocking redirects working after downgrade. 180 * Fix: Encoded URL field in country blocking options. 181 * Fix: Added a check to verify field has not already been altered prior to calling ALTER in runInstall. 182 * Fix: Fixed issue with scan_options method being called after method has been removed. 183 * Fix: Fixed bug in scan when dns_get_record fails and error condition was not handled. 184 * Fix: Fixed PHP notice when 'Crawler' not included in browser pcap result. 174 185 175 186 = 6.0.5 = -
wordfence/trunk/views/reports/activity-report-email-inline.php
r1164420 r1177050 120 120 <?php echo $title ?> 121 121 </div> 122 <a href="http://www.wordfence.com/ " style="font-size: 100%; vertical-align: baseline; outline: none; color: orange; text-decoration: none; margin: 0; padding: 0; border: 0;"><img src="http://www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt="" style="font-size: 100%; vertical-align: baseline; -ms-interpolation-mode: bicubic; outline: none; text-decoration: none; margin: 0; padding: 0; border: 0 none;" /></a>123 124 <p style="font-size: 100%; vertical-align: baseline; margin: 1em 0; padding: 0; border: 0;"> 125 This email was sent from your website <a href="<?php echo site_url() ?>"><?php echo site_url() ?></a> and is a summary of security related activity that Wordfence monitors for the period <?php printf('%s to %s', $report_start, $report_end) ?>. <?php if (!wfConfig::get('isPaid')): ?>NOTE: You are using the free version of Wordfence and are missing out on features like cellphone sign-in, country blocking and detecting if your site IP is sending spam. <a href="http://www.wordfence.com/ ?utm_source=plugin&utm_medium=UI&utm_campaign=summaryEmail">Click here to upgrade to Wordfence Premium now</a>.<?php endif ?>122 <a href="http://www.wordfence.com/zz5/" style="font-size: 100%; vertical-align: baseline; outline: none; color: orange; text-decoration: none; margin: 0; padding: 0; border: 0;"><img src="http://www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt="" style="font-size: 100%; vertical-align: baseline; -ms-interpolation-mode: bicubic; outline: none; text-decoration: none; margin: 0; padding: 0; border: 0 none;" /></a> 123 124 <p style="font-size: 100%; vertical-align: baseline; margin: 1em 0; padding: 0; border: 0;"> 125 This email was sent from your website <a href="<?php echo site_url() ?>"><?php echo site_url() ?></a> and is a summary of security related activity that Wordfence monitors for the period <?php printf('%s to %s', $report_start, $report_end) ?>. <?php if (!wfConfig::get('isPaid')): ?>NOTE: You are using the free version of Wordfence and are missing out on features like cellphone sign-in, country blocking and detecting if your site IP is sending spam. <a href="http://www.wordfence.com/zz6/">Click here to upgrade to Wordfence Premium now</a>.<?php endif ?> 126 126 </p> 127 127 -
wordfence/trunk/views/reports/activity-report-email.php
r1164420 r1177050 296 296 Activity for week of<br> <strong><?php echo date_i18n(get_option('date_format')) ?></strong> 297 297 </div> 298 <a href="http://www.wordfence.com/ "><img src="http://www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt=""/></a>298 <a href="http://www.wordfence.com/zz7/"><img src="http://www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt=""/></a> 299 299 300 300 <h2>Top 10 IP's Blocked</h2> -
wordfence/trunk/views/reports/activity-report.php
r1164420 r1177050 4 4 */ 5 5 ?> 6 <a href="//www.wordfence.com/ "><img src="//www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt=""/></a>6 <a href="//www.wordfence.com/zz8/"><img src="//www.wordfence.com/wp-content/themes/parallelus-salutation/wfCustomHome/images/wordfenceLogo.png" alt=""/></a> 7 7 8 8 <h2>Top <?php echo (int) $limit; ?> IP's Blocked</h2> -
wordfence/trunk/wordfence.php
r1172257 r1177050 5 5 Description: Wordfence Security - Anti-virus, Firewall and High Speed Cache 6 6 Author: Wordfence 7 Version: 6.0. 57 Version: 6.0.6 8 8 Author URI: http://www.wordfence.com/ 9 9 */ … … 11 11 return; 12 12 } 13 define('WORDFENCE_VERSION', '6.0. 5');13 define('WORDFENCE_VERSION', '6.0.6'); 14 14 if(get_option('wordfenceActivated') != 1){ 15 15 add_action('activated_plugin','wordfence_save_activation_error'); function wordfence_save_activation_error(){ update_option('wf_plugin_act_error', ob_get_contents()); }
Note: See TracChangeset
for help on using the changeset viewer.