Plugin Directory

Changeset 3090137


Ignore:
Timestamp:
05/21/2024 11:29:33 AM (10 months ago)
Author:
wtsec
Message:

2.4.27

  • Fixed login attempts issue
  • Internal improvements
Location:
wt-security
Files:
449 added
5 edited

Legend:

Unmodified
Added
Removed
  • wt-security/trunk/lib/Ajax.php

    r3077409 r3090137  
    997997            $open_ports[] = [
    998998                'variables' => [
    999                     "ports" => [
    1000                         'TCPResults' => $ports['TCPResults'] ? WebTotem::getOpenPortsData(array_slice($ports['TCPResults'], 0, 3)) : [],
    1001                     ],
     999                    "ports" => $ports['TCPResults'] ? WebTotem::getOpenPortsData(array_slice($ports['TCPResults'], 0, 3)) : [],
    10021000                    'more' => true,
    10031001                ],
     
    10071005            $open_ports_modal[] = [
    10081006                'variables' => [
    1009                     "ports" => [
    1010                         'TCPResults' => WebTotem::getOpenPortsData($ports['TCPResults'])
    1011                     ],
     1007                    "ports" => WebTotem::getOpenPortsData($ports['TCPResults']),
    10121008                ],
    10131009                'template' => 'open_ports',
     
    18851881                            $open_ports[] = [
    18861882                                'variables' => [
    1887                                     "ports" => [
    1888                                         'TCPResults' => WebTotem::getOpenPortsData($ports['TCPResults']),
    1889                                     ],
     1883                                    "ports" => WebTotem::getOpenPortsData($ports['TCPResults']),
    18901884                                ],
    18911885                                'template' => 'open_ports',
     
    18941888                            $open_ports_few[] = [
    18951889                                'variables' => [
    1896                                     "more" => true,
    1897                                     "ports" => [
    1898                                         'TCPResults' => $ports['TCPResults'] ? WebTotem::getOpenPortsData(array_slice($ports['TCPResults'], 0, 3)) : [],
    1899                                     ],
     1890                                    "ports" => $ports['TCPResults'] ? WebTotem::getOpenPortsData(array_slice($ports['TCPResults'], 0, 3)) : [],
     1891                                    "more" => true,
    19001892                                ],
    19011893                                'template' => 'open_ports',
  • wt-security/trunk/lib/Helper.php

    r3089405 r3090137  
    299299    }
    300300
    301 
    302 
    303     /**
    304    * Converting a date to the appropriate format.
    305    *
    306    * @param string $date
    307    *   Date in any format.
    308    * @param string $format
    309    *   The format to which you want to convert the date.
    310    *
    311    * @return string
    312    *   Returns converted Date.
    313    */
     301    /**
     302     * Converting a date to the appropriate format.
     303     *
     304     * @param string $date
     305     *   Date in any format.
     306     * @param string $format
     307     *   The format to which you want to convert the date.
     308     *
     309     * @return string
     310     *   Returns converted Date.
     311     * @throws Exception
     312     */
    314313  public static function dateFormatter($date, $format = 'M j, Y \/ H:i') {
    315314    if (!$date) {
     
    317316    }
    318317
     318
     319    if ( is_numeric($date) && (int)$date == $date ){
     320        $date = date('Y-m-d H:i', $date);
     321    }
     322
     323    if($wp_timezone = wp_timezone()){
     324        $UTC = new DateTimeZone("UTC");
     325        $date = new DateTime( $date, $UTC );
     326        $date->setTimezone( new DateTimeZone($wp_timezone->getName()) );
     327        return date_i18n($format,strtotime($date->format('Y-m-d H:i')));
     328    }
     329   
    319330    $time_zone = WebTotemOption::getOption('time_zone_offset');
    320331    $user_time = ($time_zone) ? strtotime($time_zone . 'hours', strtotime($date)) : strtotime($date);
     
    16401651        foreach ($data as $datum){
    16411652            $date_time = strtotime($datum['created_at']);
    1642             $date = date_i18n('M j, Y', $date_time);
     1653            $date = self::dateFormatter($date_time, 'M j, Y');
    16431654
    16441655            $logs[$date]['date'] = $date;
    16451656            $logs[$date]['count'] = $dates_count[$date];
    16461657            $logs[$date]['logs'][] = [
    1647                 'time' => date_i18n('H:i', $date_time),
     1658                'time' => self::dateFormatter($date_time,'H:i'),
    16481659                'user_name' => $datum['user_name'],
    16491660                'status' => $datum['status'],
  • wt-security/trunk/lib/modules/login/BFProtection.php

    r3023313 r3090137  
    172172        if (preg_match('/^(?:\d{1,3}(?:\.|$)){4}/', $ip)) {
    173173            $octets = explode('.', $ip);
    174             $bin = BFProtection . phpchr($octets[0]) . chr($octets[2]) . chr($octets[3]);
     174            $bin = chr($octets[0]) . chr($octets[2]) . chr($octets[3]);
    175175            return $bin;
    176176        }
  • wt-security/trunk/readme.txt

    r3089405 r3090137  
    88Requires PHP: 7.1
    99Requires at least: 6.0
    10 Stable tag: 2.4.26
     10Stable tag: 2.4.27
    1111
    1212WebTotem is a SaaS which provides powerful tools for securing and monitoring your website in one place in easy and flexible way.
     
    8787
    8888== Changelog ==
     89= 2.4.27 =
     90* Fixed login attempts issue
     91* Internal improvements
     92
    8993= 2.4.26 =
    9094* Feedback user issue has been fixed
  • wt-security/trunk/wt-security.php

    r3089405 r3090137  
    77 * Text Domain: wtotem
    88 * Domain Path: /lang
    9  * Version: 2.4.26
     9 * Version: 2.4.27
    1010 * License: GPL v2 or later
    1111 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    5555 * Current version of the plugin's code.
    5656 */
    57 define('WEBTOTEM_VERSION', '2.4.26');
     57define('WEBTOTEM_VERSION', '2.4.27');
    5858
    5959/**
Note: See TracChangeset for help on using the changeset viewer.