Plugin Directory

Changeset 3337978


Ignore:
Timestamp:
08/01/2025 06:39:27 PM (8 months ago)
Author:
foomagoo
Message:

Added check for 429 response from sans and code to respect their retry time.

Location:
honeypot-toolkit
Files:
24 added
4 edited

Legend:

Unmodified
Added
Removed
  • honeypot-toolkit/trunk/honeypot-toolkit.php

    r3281111 r3337978  
    44Plugin URI: https://www.sterup.com/wordpress-plugins/honeypot-toolkit/
    55Description: Automates placement of Project Honeypot links. Blocks IP Addresses using Project Honeypot, Spamcop, SANS Internet Storm Center, bad logins, and 404s.
    6 Version: 5.0.2
     6Version: 5.0.3
    77Author: Jeff Sterup
    88Author URI: https://www.sterup.com
  • honeypot-toolkit/trunk/lib/HoneypotToolkit.class.php

    r3281107 r3337978  
    876876        }
    877877
    878         update_site_option('ht_plugin_version', "5.0.2");
     878        update_site_option('ht_plugin_version', "5.0.3");
    879879    }
    880880
    881881    function check_version() {
    882         if (get_site_option('ht_plugin_version') != "5.0.2") {
     882        if (get_site_option('ht_plugin_version') != "5.0.3") {
    883883            $this->activate();
    884884        }
     
    10791079                        }
    10801080                       
    1081                         if ($htUseIStorm == '1') {
     1081                        $iStormRetry = get_site_option('ht_istorm_retry', '0');
     1082                        if ($htUseIStorm == '1' && $iStormRetry < time()) {
    10821083                            $iStormData = wp_remote_get('https://isc.sans.edu/api/ip/'.$remoteAddress.'?json', array('user-agent'=>'Wordpress/'.get_bloginfo( 'version' ).' Honeypot Toolkit/'.get_site_option('ht_plugin_version').'(contact: wpadmin@sterup.com); '.get_bloginfo( 'url' )));
    10831084                           
     
    11021103                                   
    11031104                                }
     1105                            } else if (429 === wp_remote_retrieve_response_code($iStormData)) {
     1106                                $retryTime = wp_remote_retrieve_header($iStormData, 'Retry-After');
     1107                                if (is_numeric($retryTime)) {
     1108                                    update_site_option('ht_istorm_retry', time() + sanitize_text_field($retryTime));
     1109                                } else {
     1110                                    update_site_option('ht_istorm_retry', time() + 300);
     1111                                }
    11041112                            }
    11051113                        }
  • honeypot-toolkit/trunk/readme.txt

    r3281107 r3337978  
    44Tags: honeypot, project honeypot, brute force protection, spam prevention, login monitor
    55Requires at least: 4.6.0
    6 Tested up to: 6.8
    7 Stable tag: 5.0.2
     6Tested up to: 6.8.2
     7Stable tag: 5.0.3
    88License: GPLv2
    99
    10 This plugin allows you to automatically insert your Project Honeypot links into all of your pages and block IP addresses that are listed on the Http:BL list from Project Honeypot, the Spamcop blacklist, and the SANS Internet Storm Center API.
     10Automatically insert Project Honeypot links into your pages and block IP addresses that are listed on various block lists you can choose from.
    1111
    1212== Description ==
     
    3838
    3939== Changelog ==
     40
     41= 5.0.3 =
     42Added check for 429 response from sans and code to respect their retry time.
    4043
    4144= 5.0.2 =
     
    201204== Upgrade Notice ==
    202205
    203 = 5.0.2 =
    204 Fixing database error on activation for multisite installs.
     206= 5.0.3 =
     207Added check for 429 response from sans and code to respect their retry time.
  • honeypot-toolkit/trunk/uninstall.php

    r3280722 r3337978  
    4242delete_site_option('ht_automatic_google_ranges');
    4343delete_site_option('ht_plugin_version');
     44delete_site_option('ht_istorm_retry');
    4445
    4546function HT_delete_site_data() {
Note: See TracChangeset for help on using the changeset viewer.