Plugin Directory

Changeset 3179802


Ignore:
Timestamp:
11/01/2024 07:52:47 AM (17 months ago)
Author:
glomberg
Message:

Version: 2.145.1.

Location:
security-malware-firewall
Files:
520 added
3 edited

Legend:

Unmodified
Added
Removed
  • security-malware-firewall/trunk/lib/CleantalkSP/Common/RemoteCalls.php

    r3062490 r3179802  
    2828     */
    2929    protected $without_token;
     30
     31    protected static $allowedActionsWithoutToken = [
     32        'post_api_key',
     33    ];
    3034
    3135    const COOLDOWN = 10;
     
    5458        global $spbc;
    5559
     60        $rc_servers = [
     61            'netserv3.cleantalk.org',
     62            'netserv4.cleantalk.org',
     63        ];
     64
    5665        return ! $spbc->key_is_ok &&
    5766               Request::get('spbc_remote_call_action') &&
    5867               in_array(Request::get('plugin_name'), array('security', 'spbc')) &&
    59                strpos(IP::resolve(IP::get()), 'cleantalk.org') !== false;
     68               in_array(IP::resolve(IP::get('remote_addr')), $rc_servers, true);
     69    }
     70
     71    private static function isAllowedWithoutToken($rc)
     72    {
     73        return in_array($rc, self::$allowedActionsWithoutToken, true);
    6074    }
    6175
     
    88102                if (
    89103                    ($this->state->data['key_is_ok'] !== false) &&
    90                     (($token === strtolower(md5($this->state->api_key)) ||
    91                     $token === strtolower(hash('sha256', $this->state->api_key))) ||
    92                     $this->without_token)
     104                    (
     105                        ( $token === strtolower(md5($this->state->api_key)) ||
     106                        $token === strtolower(hash('sha256', $this->state->api_key)) ) ||
     107                        ( $this->without_token && self::isAllowedWithoutToken($action) )
     108                    )
    93109                ) {
    94110                    // Flag to let plugin know that Remote Call is running.
  • security-malware-firewall/trunk/readme.txt

    r3176715 r3179802  
    55Tested up to: 6.6
    66Requires PHP: 5.6
    7 Stable tag: 2.145
     7Stable tag: 2.145.1
    88License: GPLv2
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    336336
    337337== Changelog ==
     338
     339= 2.145.1 Nov 01 2024
     340* Fix. Remote Calls. RC calling without token fixed. (#438)
    338341
    339342= 2.145 Oct 28 2024
  • security-malware-firewall/trunk/security-malware-firewall.php

    r3176715 r3179802  
    66Description: Security & Malware scan by CleanTalk to protect your website from online threats and viruses. IP/Country FireWall, Web application FireWall. Detailed stats and logs to have full control.
    77Author: CleanTalk Security
    8 Version: 2.145
     8Version: 2.145.1
    99Author URI: https://cleantalk.org
    1010Text Domain: security-malware-firewall
Note: See TracChangeset for help on using the changeset viewer.