Plugin Directory

Changeset 3171581


Ignore:
Timestamp:
10/18/2024 03:45:29 PM (18 months ago)
Author:
gdatavaas
Message:

release 2.0.8: fix post updates

Location:
gdata-antivirus
Files:
1254 added
4 edited

Legend:

Unmodified
Added
Removed
  • gdata-antivirus/trunk/Readme.txt

    r3171530 r3171581  
    55Tested up to: 6.6
    66Requires PHP: 8.1
    7 Stable tag: 2.0.7
     7Stable tag: 2.0.8
    88License: GNU General Public License v3.0
    99License URI: https://github.com/GDATASoftwareAG/vaas/blob/main/LICENSE
     
    5757== Changelog ==
    5858
     59= 2.0.8 =
     60* bugfix: posts could not be saved
     61
     62= 2.0.7 =
     63* enable upload scan by removing the nonce check temporary
     64
     65= 2.0.6 =
     66* changed the full scan indicator. the counting method was error prone
     67
    5968= 2.0.5 =
    6069* don't connect to the backend for every page load
  • gdata-antivirus/trunk/Vaas/ScanClient.php

    r3171530 r3171581  
    4343            $post_scan_enabled = (bool) get_option('gdatacyberdefenseag_antivirus_options_on_demand_scan_post_scan_enabled', \true);
    4444            if ($post_scan_enabled === \true) {
    45                 add_filter('wp_insert_post_data', array($this, 'scan_post'), 10, 3);
     45                add_filter('wp_insert_post_data', array($this, 'scan_post'), 10, 1);
    4646            }
    4747        }
     
    7070            $this->connected = \true;
    7171        }
    72         public function scan_post($data, $postdata, $unsanitized_postarr)
    73         {
    74             $data = wp_unslash($unsanitized_postarr);
     72        public function scan_post($data)
     73        {
    7574            if (empty($data['post_content'])) {
    7675                return $data;
     
    8079                return $data;
    8180            }
    82             if (empty($postdata['post_content'])) {
    83                 return $data;
    84             }
    85             $post_content = wp_unslash($postdata['post_content']);
     81            $post_content = wp_unslash($data['post_content']);
    8682            $stream = $this->file_system->get_resource_stream_from_string($post_content);
    8783            $this->connect();
     
    108104                wp_die(esc_html__('virus found', 'gdata-antivirus'));
    109105            }
    110             return $postdata;
     106            return $data;
    111107        }
    112108        public function scan_comment($commentdata)
  • gdata-antivirus/trunk/composer.json

    r3171530 r3171581  
    11{
    22    "name": "gdatacyberdefenseag\/gdata-antivirus",
    3     "version": "2.0.7",
     3    "version": "2.0.8",
    44    "autoload": {
    55        "psr-4": {
  • gdata-antivirus/trunk/gdata-antivirus.php

    r3171530 r3171581  
    1212 * @wordpress-plugin
    1313 * Plugin Name: G DATA Antivirus
    14  * Version: 2.0.7
     14 * Version: 2.0.8
    1515 * Requires at least: 6.2
    1616 * Tested up to: 6.6
Note: See TracChangeset for help on using the changeset viewer.