Remove `BLACKLIST_IP_ADDRESSES`
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 10 Jun 2021 13:33:30 +0000 (15:33 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 15 Jun 2021 11:48:04 +0000 (13:48 +0200)
see #3914

com.woltlab.wcf/option.xml
constants.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/options.inc.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 1fa47391fc451f07f031bca0f16cd1100d3ee271..1d74ee011c69449b6a2e2127861ac1a49d2640e8 100644 (file)
@@ -714,10 +714,6 @@ block:wcf.acp.option.blacklist_sfs_action.block]]></selectoptions>
                        </option>
                        <!-- /security.blacklist.stopforumspam -->
                        <!-- security.blacklist.custom -->
-                       <option name="blacklist_ip_addresses">
-                               <categoryname>security.blacklist.custom</categoryname>
-                               <optiontype>textarea</optiontype>
-                       </option>
                        <option name="blacklist_user_agents">
                                <categoryname>security.blacklist.custom</categoryname>
                                <optiontype>textarea</optiontype>
@@ -1701,5 +1697,6 @@ DESC:wcf.global.sortOrder.descending</selectoptions>
        </import>
        <delete>
                <option name="module_master_password"/>
+               <option name="blacklist_ip_addresses"/>
        </delete>
 </data>
index 86ace69315a8811204ff4c4916d14510b0fe9527..46e686a2ee6ad5316e3bc534112079b338d86a84 100644 (file)
@@ -76,7 +76,6 @@
 \define('USER_AUTHENTICATION_FAILURE_USER_CAPTCHA', 3);
 \define('USER_AUTHENTICATION_FAILURE_EXPIRATION', 30);
 \define('SIGNATURE_SECRET', '');
-\define('BLACKLIST_IP_ADDRESSES', '');
 \define('BLACKLIST_USER_AGENTS', '');
 \define('CAPTCHA_TYPE', 'com.woltlab.wcf.recaptcha');
 \define('REGISTER_USE_CAPTCHA', 1);
index 27c90094864e8b9d2313d8324c77fd0aab4fd8ac..5c061c2127a373d68c41cdfdc03375cb11e8c67b 100644 (file)
@@ -470,6 +470,10 @@ class WCF
         // The master password has been removed since 5.5.
         // https://github.com/WoltLab/WCF/issues/3913
         \define('MODULE_MASTER_PASSWORD', 0);
+
+        // The IP address blocklist was removed in 5.5.
+        // https://github.com/WoltLab/WCF/issues/3914
+        \define('BLACKLIST_IP_ADDRESSES', '');
     }
 
     /**
@@ -535,32 +539,6 @@ class WCF
     {
         $isAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest');
 
-        if (\defined('BLACKLIST_IP_ADDRESSES') && BLACKLIST_IP_ADDRESSES != '') {
-            if (
-                !StringUtil::executeWordFilter(
-                    UserUtil::convertIPv6To4(UserUtil::getIpAddress()),
-                    BLACKLIST_IP_ADDRESSES
-                )
-            ) {
-                if ($isAjax) {
-                    throw new AJAXException(
-                        self::getLanguage()->getDynamicVariable('wcf.ajax.error.permissionDenied'),
-                        AJAXException::INSUFFICIENT_PERMISSIONS
-                    );
-                } else {
-                    throw new PermissionDeniedException();
-                }
-            } elseif (!StringUtil::executeWordFilter(UserUtil::getIpAddress(), BLACKLIST_IP_ADDRESSES)) {
-                if ($isAjax) {
-                    throw new AJAXException(
-                        self::getLanguage()->getDynamicVariable('wcf.ajax.error.permissionDenied'),
-                        AJAXException::INSUFFICIENT_PERMISSIONS
-                    );
-                } else {
-                    throw new PermissionDeniedException();
-                }
-            }
-        }
         if (\defined('BLACKLIST_USER_AGENTS') && BLACKLIST_USER_AGENTS != '') {
             if (!StringUtil::executeWordFilter(UserUtil::getUserAgent(), BLACKLIST_USER_AGENTS)) {
                 if ($isAjax) {
index 35d82f0f1d1152d8779264391c37cfd414c66258..62041ec59bf70b8c1028f11b804a5abd93eaed37 100644 (file)
@@ -24,7 +24,6 @@ if (\file_exists(WCF_DIR . 'cookiePrefix.txt')) {
 
 \define('HTTP_SEND_X_FRAME_OPTIONS', 0);
 
-\define('BLACKLIST_IP_ADDRESSES', '');
 \define('BLACKLIST_USER_AGENTS', '');
 
 \define('CACHE_SOURCE_TYPE', 'disk');
index 93e0fec9f992a253347d5fb6cae4b5d4b46a2dae..51400b1a1ebe00ea4a64c47d3ab05166f1ebb78d 100644 (file)
@@ -1257,8 +1257,6 @@ ACHTUNG: Die oben genannten Meldungen sind stark gekürzt. Sie können Details z
                <item name="wcf.acp.notice.showOrder.description"><![CDATA[Legt die Reihenfolge fest, in der die Hinweise angezeigt werden.]]></item>
        </category>
        <category name="wcf.acp.option">
-               <item name="wcf.acp.option.blacklist_ip_addresses"><![CDATA[IP-Adresse ausschließen (Obsolet)]]></item>
-               <item name="wcf.acp.option.blacklist_ip_addresses.description"><![CDATA[Der Ausschluss einzelner IP-Adressen erfolgt zuverlässiger und leistungsfähiger auf Ebene des Webservers. Diese Option ist obsolet und wird mit einer zukünftigen Version entfernt.]]></item>
                <item name="wcf.acp.option.blacklist_user_agents"><![CDATA[Browser-Kennung ausschließen (Obsolet)]]></item>
                <item name="wcf.acp.option.blacklist_user_agents.description"><![CDATA[Browser-Kennungen können durch Angreifer leicht gefälscht werden und sind kein zuverlässiger Indikator für die Identität des Anfragestellers. Falls ein Ausschluss dennoch gewünscht ist, erfolgt ein Ausschluss von Browser-Kenunngen leistungsfähiger auf Ebene des Webservers. Diese Option ist obsolet und wird mit einer zukünftigen Version entfernt.]]></item>
                <item name="wcf.acp.option.cache_source_memcached_host"><![CDATA[Memcached-Server]]></item>
@@ -5540,5 +5538,7 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|lang
        <item name="wcf.acp.masterPassword.enter.deprecated"/>
        <item name="wcf.acp.option.module_master_password"/>
        <item name="wcf.acp.option.module_master_password.description"/>
+       <item name="wcf.acp.option.blacklist_ip_addresses"/>
+       <item name="wcf.acp.option.blacklist_ip_addresses.description"/>
 </delete>
 </language>
index 3d42467792a24d077142610b761a5985a13f37c8..05c4b8cfa82de6feff0d307a08cc3a65b38b769f 100644 (file)
@@ -1235,8 +1235,6 @@ ATTENTION: The messages listed above are greatly shortened. You can view details
                <item name="wcf.acp.notice.showOrder.description"><![CDATA[Choose display order of notices.]]></item>
        </category>
        <category name="wcf.acp.option">
-               <item name="wcf.acp.option.blacklist_ip_addresses"><![CDATA[Block by IP Address (Not Recommended)]]></item>
-               <item name="wcf.acp.option.blacklist_ip_addresses.description"><![CDATA[Blocking IP Addresses is more reliably and performant achieved at the web server level. Use of this blocklist is not recommended and this option will be removed in a future version.]]></item>
                <item name="wcf.acp.option.blacklist_user_agents"><![CDATA[Block by User-Agent (Not Recommended)]]></item>
                <item name="wcf.acp.option.blacklist_user_agents.description"><![CDATA[User-Agents are easily faked by an attacker and not a reliable indicator of the client’s identity. If a block based on the User-Agent is desired nonetheless, it is achieve more performant at the web server level. Use of this blocklist is not recommended and this option will be removed in a future version.]]></item>
                <item name="wcf.acp.option.cache_source_memcached_host"><![CDATA[Memcached-Server]]></item>
@@ -5541,5 +5539,7 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|langu
        <item name="wcf.acp.masterPassword.enter.deprecated"/>
        <item name="wcf.acp.option.module_master_password"/>
        <item name="wcf.acp.option.module_master_password.description"/>
+       <item name="wcf.acp.option.blacklist_ip_addresses"/>
+       <item name="wcf.acp.option.blacklist_ip_addresses.description"/>
 </delete>
 </language>