Plugin Directory

Changeset 3424380


Ignore:
Timestamp:
12/20/2025 09:06:49 PM (3 months ago)
Author:
wfryan
Message:

8.1.4 - December 20, 2025

  • Fix: Fixed an issue with inet_pton introduced by a recent patch to PHP 8.1+ that could cause a fatal error if a malformed IP address was passed to the call
Location:
wordfence
Files:
130 added
130 deleted
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wordfence/tags/8.1.4/languages/wordfence.pot

    r3409854 r3424380  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Wordfence Security 8.1.3\n"
    6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordfence-zip-oHyt6XP49\n"
     5"Project-Id-Version: Wordfence Security 8.1.4\n"
     6"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordfence-zip-ZSJgBchaN\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    88"Language-Team: LANGUAGE <LL@li.org>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-12-03T16:17:21+00:00\n"
     12"POT-Creation-Date: 2025-12-20T20:40:35+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.7.1\n"
     
    86438643msgstr ""
    86448644
    8645 #: lib/wfUtils.php:1740
    8646 #: lib/wfUtils.php:1749
     8645#: lib/wfUtils.php:1751
     8646#: lib/wfUtils.php:1760
    86478647msgid "Wordfence error: No encryption key found!"
    86488648msgstr ""
    86498649
    86508650#. translators: Error message.
    8651 #: lib/wfUtils.php:2062
     8651#: lib/wfUtils.php:2073
    86528652msgid "Call to Wordfence API to resolve IPs failed: %s"
    86538653msgstr ""
  • wordfence/tags/8.1.4/lib/wfCrawl.php

    r3390597 r3424380  
    2323        $db = new wfDB();
    2424        $IPn = wfUtils::inet_pton($IP);
    25         $ipHex = wfDB::binaryValueToSQLHex(wfUtils::inet_pton($IPn));
     25        $ipHex = wfDB::binaryValueToSQLHex($IPn);
    2626        $status = $db->querySingle("select status from $table where IP={$ipHex} and patternSig=UNHEX(MD5('%s')) and lastUpdate > unix_timestamp() - %d", $hostPattern, WORDFENCE_CRAWLER_VERIFY_CACHE_TIME);
    2727        if($status){
  • wordfence/tags/8.1.4/lib/wfUtils.php

    r3390597 r3424380  
    899899     */
    900900    public static function inet_aton($ip) {
    901         $ip = preg_replace('/(?<=^|\.)0+([1-9])/', '$1', $ip);
    902         return sprintf("%u", ip2long($ip));
     901        try {
     902            $ip = preg_replace('/(?<=^|\.)0+([1-9])/', '$1', $ip);
     903            return sprintf("%u", ip2long($ip));
     904        }
     905        catch (Throwable $t) {
     906            //Ignore -- fall through to default
     907        }
     908        return '0';
    903909    }
    904910
     
    924930     */
    925931    public static function inet_pton($ip) {
    926         // convert the 4 char IPv4 to IPv6 mapped version.
    927         $pton = str_pad(self::hasIPv6Support() ? @inet_pton($ip) : self::_inet_pton($ip), 16,
    928             "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00", STR_PAD_LEFT);
     932        $default = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00";
     933        try {
     934            // convert the 4 char IPv4 to IPv6 mapped version.
     935            $pton = str_pad(self::hasIPv6Support() ? @inet_pton($ip) : self::_inet_pton($ip), 16, $default, STR_PAD_LEFT);
     936        }
     937        catch (Throwable $t) {
     938            $pton = $default;
     939        }
    929940        return $pton;
    930941    }
  • wordfence/tags/8.1.4/modules/login-security/wordfence-login-security.php

    r3409854 r3424380  
    2828   
    2929    define('WORDFENCE_LS_VERSION', '1.1.15');
    30     define('WORDFENCE_LS_BUILD_NUMBER', '1764778641');
     30    define('WORDFENCE_LS_BUILD_NUMBER', '1766263234');
    3131
    3232    define('WORDFENCE_LS_PLUGIN_BASENAME', plugin_basename(__FILE__));
  • wordfence/tags/8.1.4/readme.txt

    r3409854 r3424380  
    55Requires PHP: 7.0
    66Tested up to: 6.9
    7 Stable tag: 8.1.3
     7Stable tag: 8.1.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    207207
    208208== Changelog ==
     209
     210= 8.1.4 - December 20, 2025 =
     211* Fix: Fixed an issue with `inet_pton` introduced by a recent patch to PHP 8.1+ that could cause a fatal error if a malformed IP address was passed to the call
    209212
    210213= 8.1.3 - December 3, 2025 =
  • wordfence/tags/8.1.4/vendor/wordfence/wf-waf/src/lib/utils.php

    r3216086 r3424380  
    2525     */
    2626    public static function inet_pton($ip) {
    27         // convert the 4 char IPv4 to IPv6 mapped version.
    28         $pton = str_pad(self::hasIPv6Support() ? inet_pton($ip) : self::_inet_pton($ip), 16,
    29             "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00", STR_PAD_LEFT);
     27        $default = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00";
     28        try {
     29            // convert the 4 char IPv4 to IPv6 mapped version.
     30            $pton = str_pad(self::hasIPv6Support() ? inet_pton($ip) : self::_inet_pton($ip), 16, $default, STR_PAD_LEFT);
     31        }
     32        catch (Throwable $t) {
     33            $pton = $default;
     34        }
    3035        return $pton;
    3136    }
  • wordfence/tags/8.1.4/wordfence.php

    r3409854 r3424380  
    55Description: Wordfence Security - Anti-virus, Firewall and Malware Scan
    66Author: Wordfence
    7 Version: 8.1.3
     7Version: 8.1.4
    88Author URI: https://www.wordfence.com/
    99Text Domain: wordfence
     
    3939    exit;
    4040}
    41 define('WORDFENCE_VERSION', '8.1.3');
    42 define('WORDFENCE_BUILD_NUMBER', '1764778641');
     41define('WORDFENCE_VERSION', '8.1.4');
     42define('WORDFENCE_BUILD_NUMBER', '1766263234');
    4343define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) :
    4444    basename(dirname(__FILE__)) . '/' . basename(__FILE__));
  • wordfence/trunk/languages/wordfence.pot

    r3409854 r3424380  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Wordfence Security 8.1.3\n"
    6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordfence-zip-oHyt6XP49\n"
     5"Project-Id-Version: Wordfence Security 8.1.4\n"
     6"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordfence-zip-ZSJgBchaN\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    88"Language-Team: LANGUAGE <LL@li.org>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-12-03T16:17:21+00:00\n"
     12"POT-Creation-Date: 2025-12-20T20:40:35+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.7.1\n"
     
    86438643msgstr ""
    86448644
    8645 #: lib/wfUtils.php:1740
    8646 #: lib/wfUtils.php:1749
     8645#: lib/wfUtils.php:1751
     8646#: lib/wfUtils.php:1760
    86478647msgid "Wordfence error: No encryption key found!"
    86488648msgstr ""
    86498649
    86508650#. translators: Error message.
    8651 #: lib/wfUtils.php:2062
     8651#: lib/wfUtils.php:2073
    86528652msgid "Call to Wordfence API to resolve IPs failed: %s"
    86538653msgstr ""
  • wordfence/trunk/lib/wfCrawl.php

    r3390597 r3424380  
    2323        $db = new wfDB();
    2424        $IPn = wfUtils::inet_pton($IP);
    25         $ipHex = wfDB::binaryValueToSQLHex(wfUtils::inet_pton($IPn));
     25        $ipHex = wfDB::binaryValueToSQLHex($IPn);
    2626        $status = $db->querySingle("select status from $table where IP={$ipHex} and patternSig=UNHEX(MD5('%s')) and lastUpdate > unix_timestamp() - %d", $hostPattern, WORDFENCE_CRAWLER_VERIFY_CACHE_TIME);
    2727        if($status){
  • wordfence/trunk/lib/wfUtils.php

    r3390597 r3424380  
    899899     */
    900900    public static function inet_aton($ip) {
    901         $ip = preg_replace('/(?<=^|\.)0+([1-9])/', '$1', $ip);
    902         return sprintf("%u", ip2long($ip));
     901        try {
     902            $ip = preg_replace('/(?<=^|\.)0+([1-9])/', '$1', $ip);
     903            return sprintf("%u", ip2long($ip));
     904        }
     905        catch (Throwable $t) {
     906            //Ignore -- fall through to default
     907        }
     908        return '0';
    903909    }
    904910
     
    924930     */
    925931    public static function inet_pton($ip) {
    926         // convert the 4 char IPv4 to IPv6 mapped version.
    927         $pton = str_pad(self::hasIPv6Support() ? @inet_pton($ip) : self::_inet_pton($ip), 16,
    928             "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00", STR_PAD_LEFT);
     932        $default = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00";
     933        try {
     934            // convert the 4 char IPv4 to IPv6 mapped version.
     935            $pton = str_pad(self::hasIPv6Support() ? @inet_pton($ip) : self::_inet_pton($ip), 16, $default, STR_PAD_LEFT);
     936        }
     937        catch (Throwable $t) {
     938            $pton = $default;
     939        }
    929940        return $pton;
    930941    }
  • wordfence/trunk/modules/login-security/wordfence-login-security.php

    r3409854 r3424380  
    2828   
    2929    define('WORDFENCE_LS_VERSION', '1.1.15');
    30     define('WORDFENCE_LS_BUILD_NUMBER', '1764778641');
     30    define('WORDFENCE_LS_BUILD_NUMBER', '1766263234');
    3131
    3232    define('WORDFENCE_LS_PLUGIN_BASENAME', plugin_basename(__FILE__));
  • wordfence/trunk/readme.txt

    r3409854 r3424380  
    55Requires PHP: 7.0
    66Tested up to: 6.9
    7 Stable tag: 8.1.3
     7Stable tag: 8.1.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    207207
    208208== Changelog ==
     209
     210= 8.1.4 - December 20, 2025 =
     211* Fix: Fixed an issue with `inet_pton` introduced by a recent patch to PHP 8.1+ that could cause a fatal error if a malformed IP address was passed to the call
    209212
    210213= 8.1.3 - December 3, 2025 =
  • wordfence/trunk/vendor/wordfence/wf-waf/src/lib/utils.php

    r3216086 r3424380  
    2525     */
    2626    public static function inet_pton($ip) {
    27         // convert the 4 char IPv4 to IPv6 mapped version.
    28         $pton = str_pad(self::hasIPv6Support() ? inet_pton($ip) : self::_inet_pton($ip), 16,
    29             "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00", STR_PAD_LEFT);
     27        $default = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00";
     28        try {
     29            // convert the 4 char IPv4 to IPv6 mapped version.
     30            $pton = str_pad(self::hasIPv6Support() ? inet_pton($ip) : self::_inet_pton($ip), 16, $default, STR_PAD_LEFT);
     31        }
     32        catch (Throwable $t) {
     33            $pton = $default;
     34        }
    3035        return $pton;
    3136    }
  • wordfence/trunk/wordfence.php

    r3409854 r3424380  
    55Description: Wordfence Security - Anti-virus, Firewall and Malware Scan
    66Author: Wordfence
    7 Version: 8.1.3
     7Version: 8.1.4
    88Author URI: https://www.wordfence.com/
    99Text Domain: wordfence
     
    3939    exit;
    4040}
    41 define('WORDFENCE_VERSION', '8.1.3');
    42 define('WORDFENCE_BUILD_NUMBER', '1764778641');
     41define('WORDFENCE_VERSION', '8.1.4');
     42define('WORDFENCE_BUILD_NUMBER', '1766263234');
    4343define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) :
    4444    basename(dirname(__FILE__)) . '/' . basename(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.