Plugin Directory

Changeset 2943291


Ignore:
Timestamp:
07/25/2023 11:54:30 PM (3 years ago)
Author:
brightedge
Message:

Added support for PHP 8.2 and Wordpress 6.2.2

Location:
brightedge-autopilot/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • brightedge-autopilot/trunk/be_ixf_php_wp.php

    r2781524 r2943291  
    44 * Plugin URI: https://www.brightedge.com/
    55 * Description: Enables BrightEdge Autopilot on your Wordpress site.
    6  * Version: 1.1.9
     6 * Version: 1.1.11
    77 * Author: BrightEdge
    88 * Author URI: https://www.brightedge.com/
  • brightedge-autopilot/trunk/readme.txt

    r2781524 r2943291  
    66Author: BrightEdge
    77Requires PHP: 5.5
    8 Tested up to: 5.9
    9 Version: 1.1.9
     8Tested up to: 6.2.2
     9Version: 1.1.11
    1010Copyright: BrightEdge Technologies, Inc.
    1111License: www.brightedge.com/infrastructure-product-terms
     
    2525
    2626== Changelog ==
     27 1.1.11 =
     28* Release date: July 13, 2023
     29
     30**Update**
     31
     32* Updated wordpress supported version to 6.2.2 and PHP version 8.2
     33
     34= 1.1.10 =
     35* Release date: January 19, 2023
     36
     37**Update**
     38
     39* Handle potential security vulnerability in codebase
     40
    2741= 1.1.9 =
    2842* Release date: July 28, 2022
  • brightedge-autopilot/trunk/src/Controller.php

    r2285207 r2943291  
    100100        add_action('wp_head', function() {
    101101            echo BEIXFConstants::WP_VERSION;
    102             echo $this->be_ixf->getHeadOpen();
     102            echo html_entity_decode(wp_unslash($this->be_ixf->getHeadOpen()));
    103103        },1);
    104104    }
  • brightedge-autopilot/trunk/src/View.php

    r2781524 r2943291  
    9393    public function ixfRenderBody1BlockAboveFooter(){
    9494        if ($this->controller->ixf_data){
    95             echo $this->buildFooterScript($this->controller->ixf_data, BEIXFConstants::ABOVE_FOOTER);
     95            echo html_entity_decode(wp_unslash($this->buildFooterScript($this->controller->ixf_data, BEIXFConstants::ABOVE_FOOTER)));
    9696        }
    9797
     
    112112    public function ixfRenderBody1BlockFirstElementInFooter(){
    113113        if ($this->controller->ixf_data){
    114             echo $this->buildFooterScript($this->controller->ixf_data, BEIXFConstants::FIRST_ELEMENT_IN_FOOTER);
     114            echo html_entity_decode(wp_unslash($this->buildFooterScript($this->controller->ixf_data, BEIXFConstants::FIRST_ELEMENT_IN_FOOTER)));
    115115        }
    116116
     
    125125        if(is_singular()){
    126126            add_action('wp_footer',function() {
    127                 echo $this->controller->ixf_body_open_data;
     127                echo html_entity_decode(wp_unslash($this->controller->ixf_body_open_data));
    128128            }, 99);
    129129        }
     
    150150
    151151        if (isset($this->controller->ixf_data)){
    152             echo $this->controller->ixf_data;
     152            echo html_entity_decode(wp_unslash($this->controller->ixf_data));
    153153        }
    154154
     
    166166
    167167        if (isset($this->controller->ixf_data)){
    168             echo $this->controller->ixf_data;
     168            echo html_entity_decode(wp_unslash($this->controller->ixf_data));
    169169        }
    170170
     
    179179    public function ixfRenderBody1BlockShortcode(){
    180180        if (isset($this->controller->ixf_data)){
    181             echo $this->controller->ixf_data;
     181            echo html_entity_decode(wp_unslash($this->controller->ixf_data));
    182182        }
    183183    }
     
    185185    public function ixfAddCloseBlock(){
    186186        add_action('wp_footer',function() {
    187             echo $this->controller->ixf_close_data;
     187            echo html_entity_decode(wp_unslash($this->controller->ixf_close_data));
    188188        }, 100);
    189189    }
  • brightedge-autopilot/trunk/src/be_ixf_client.php

    r2781524 r2943291  
    3232}
    3333
     34// added to suppor drupal 10 / php 8.2
     35#[\AllowDynamicProperties]
    3436class BEIXFClient implements BEIXFClientInterface {
    3537    public static $ENVIRONMENT_CONFIG = "sdk.environment";
     
    99101    public static $DIAGNOSTIC_STRING_DISABLED = false;
    100102
     103    public static $ALLOW_DEBUG_MODE_CONFIG = 'allow_debug';
    101104    public static $ALLOW_DEBUG_MODE = true;
    102105
     
    136139    public static $PRODUCT_NAME = "be_ixf";
    137140    public static $CLIENT_NAME = "php_sdk";
    138     public static $CLIENT_VERSION = "1.5.8";
     141    public static $CLIENT_VERSION = "1.5.11";
    139142
    140143    private static $API_VERSION = "1.0.0";
     
    230233        // Merge passed in params with defaults for config.
    231234        $this->config = array_merge($this->config, $params);
     235
     236        if (isset($this->config[self::$ALLOW_DEBUG_MODE_CONFIG])) {
     237            self::$ALLOW_DEBUG_MODE = $this->config[self::$ALLOW_DEBUG_MODE_CONFIG];
     238        }
    232239
    233240        if (isset($this->config[self::$CAPSULE_MODE_CONFIG])) {
     
    462469            // Should cURL return or print out the data? (true = return, false = print)
    463470            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    464             // disable SSL certificate check
    465             curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    466             curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    467471            // connect timeout in milliseconds
    468472            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, $connect_timeout);
     
    16121616            date_default_timezone_set(self::$NORMALIZED_TIMEZONE);
    16131617            // $sb .= strftime("${prefix}y_%Y; ${prefix}m_%m; ${prefix}d_%d; ${prefix}h_%H; ${prefix}mh_%M; ", $epochTimeInMillis / 1000);
    1614             $sb .= date("${updated_prefix}\y_Y; ${updated_prefix}\m_m; ${updated_prefix}\d_d; ${updated_prefix}\h_H; ${updated_prefix}\m\h_i; ", intval($epochTimeInMillis / 1000));
    1615             $sb .= "${prefix}_epoch:" . $epochTimeInMillis;
     1618            $sb .= date("{$updated_prefix}\y_Y; {$updated_prefix}\m_m; {$updated_prefix}\d_d; {$updated_prefix}\h_H; {$updated_prefix}\m\h_i; ", intval($epochTimeInMillis / 1000));
     1619            $sb .= "{$prefix}_epoch:" . $epochTimeInMillis;
    16161620            return $sb;
    16171621        } finally {
     
    16351639            date_default_timezone_set(self::$NORMALIZED_TIMEZONE);
    16361640            // $sb .= strftime("${prefix}ym_%Y%m ${prefix}d_%d; ", $epochTimeInMillis / 1000);
    1637             $sb .= date("${updated_prefix}\y\m_Ym ${updated_prefix}\d_d; ", intval($epochTimeInMillis / 1000));
    1638             $sb .= "${prefix}ct_" . IXFSDKUtils::roundUpElapsedTime($timer);
     1641            $sb .= date("{$updated_prefix}\y\m_Ym {$updated_prefix}\d_d; ", intval($epochTimeInMillis / 1000));
     1642            $sb .= "{$prefix}ct_" . IXFSDKUtils::roundUpElapsedTime($timer);
    16391643            return $sb;
    16401644        } finally {
     
    16491653            date_default_timezone_set(self::$NORMALIZED_TIMEZONE);
    16501654            // $sb .= strftime("${prefix}_tstr:%a %b %d %H:%M:%S PST %Y; ", $epochTimeInMillis / 1000);
    1651             $sb .= "${prefix}_" . date("\\t\\s\\t\\r:D M d H:i:s \P\S\T Y; ", intval($epochTimeInMillis / 1000));
    1652             $sb .= "${prefix}_epoch:" . $epochTimeInMillis;
     1655            $sb .= "{$prefix}_" . date("\\t\\s\\t\\r:D M d H:i:s \P\S\T Y; ", intval($epochTimeInMillis / 1000));
     1656            $sb .= "{$prefix}_epoch:" . $epochTimeInMillis;
    16531657            return $sb;
    16541658        } finally {
  • brightedge-autopilot/trunk/src/constants.php

    r2781524 r2943291  
    55class BEIXFConstants{
    66    // wordpress plugin version
    7     const WP_VERSION = '<meta name="be:wp" content="1.1.9">';
     7    const WP_VERSION = '<meta name="be:wp" content="1.1.11">';
    88    // account id
    99    const ACCOUNT_ID = 'account_id';
Note: See TracChangeset for help on using the changeset viewer.