Plugin Directory

Changeset 3220184


Ignore:
Timestamp:
01/10/2025 12:12:53 PM (15 months ago)
Author:
sendsmaily
Message:

Release 3.1.4, see readme.txt for the changelog.

Location:
smaily-for-wp
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • smaily-for-wp/tags/3.1.4/admin/class-smaily-for-wp-admin.php

    r2993727 r3220184  
    6666     */
    6767    public function enqueue_scripts() {
    68         wp_register_script( $this->plugin_name, SMLY4WP_PLUGIN_URL . '/admin/js/smaily-for-wp-admin.js', array( 'jquery' ), $this->version, false );
    69         wp_enqueue_script( $this->plugin_name );
    70         wp_add_inline_script( $this->plugin_name, 'var smaily_for_wp = ' . json_encode( array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) ) . ';' );
     68        $user = wp_get_current_user();
     69        if ( $user->has_cap( 'edit_plugins' ) ) {
     70            wp_register_script( $this->plugin_name, SMLY4WP_PLUGIN_URL . '/admin/js/smaily-for-wp-admin.js', array( 'jquery' ), $this->version, false );
     71            wp_enqueue_script( $this->plugin_name );
     72            wp_add_inline_script( $this->plugin_name, 'var smaily_for_wp = ' . json_encode( array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) ) . ';' );
     73        }
    7174    }
    7275
     
    121124        );
    122125
    123         wp_add_inline_script( $this->plugin_name, 'var autoresponders = ' . json_encode( $autoresponders ) . ';' );
     126        wp_add_inline_script( $this->plugin_name, sprintf( 'var autoresponders = JSON.stringify(%s);', wp_json_encode( $autoresponders ) ), 'before' );
    124127    }
    125128
     
    140143     */
    141144    public function smaily_admin_save() {
     145        $user = wp_get_current_user();
     146        if ( ! $user->has_cap( 'edit_plugins' ) ) {
     147            return;
     148        }
     149
    142150        // Allow only posted data.
    143151        if ( empty( $_POST ) ) {
  • smaily-for-wp/tags/3.1.4/readme.txt

    r2993727 r3220184  
    44Requires PHP: 5.6
    55Requires at least: 4.0
    6 Stable tag: 3.1.2
     6Stable tag: 3.1.4
    77Tags: widget, plugin, sidebar, api, mail, email, marketing, smaily
    88Tested up to: 6.4
     
    7676
    7777== Changelog ==
     78
     79= 3.1.4 =
     80- Fix a security issue where users who didn't have correct privileges to edit the plugin settings were allowed to do so through console in administrators interface. https://www.cve.org/CVERecord?id=CVE-2024-54286
     81
     82= 3.1.3 =
     83- Fix an issue where blocks section is not rendering due to autoresponders JSON response bad formatting.
    7884
    7985= 3.1.2 =
  • smaily-for-wp/tags/3.1.4/smaily-for-wp.php

    r2993727 r3220184  
    1010 * Text Domain:       smaily-for-wp
    1111 * Description:       Smaily newsletter subscription form.
    12  * Version:           3.1.2
     12 * Version:           3.1.4
    1313 * Author:            Sendsmaily LLC
    1414 * Author URI:        https://smaily.com
     
    2525 * Current plugin version.
    2626 */
    27 define( 'SMLY4WP_PLUGIN_VERSION', '3.1.2' );
     27define( 'SMLY4WP_PLUGIN_VERSION', '3.1.4' );
    2828
    2929/**
  • smaily-for-wp/tags/3.1.4/vendor/composer/InstalledVersions.php

    r2887377 r3220184  
    323323
    324324        $installed = array();
     325        $copiedLocalDir = false;
    325326
    326327        if (self::$canGetVendors) {
     
    331332                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332333                    $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
    334                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335                         self::$installed = $installed[count($installed) - 1];
     334                    self::$installedByVendor[$vendorDir] = $required;
     335                    $installed[] = $required;
     336                    if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
     337                        self::$installed = $required;
     338                        $copiedLocalDir = true;
    336339                    }
    337340                }
     
    351354        }
    352355
    353         if (self::$installed !== array()) {
     356        if (self::$installed !== array() && !$copiedLocalDir) {
    354357            $installed[] = self::$installed;
    355358        }
  • smaily-for-wp/tags/3.1.4/vendor/composer/installed.php

    r2993727 r3220184  
    22    'root' => array(
    33        'name' => 'smaily/smaily_for_wp',
    4         'pretty_version' => '3.1.2',
    5         'version' => '3.1.2.0',
    6         'reference' => '1f468101c333fae4d27b7f79f08fde4de3f35a09',
     4        'pretty_version' => '3.1.4',
     5        'version' => '3.1.4.0',
     6        'reference' => '91fe560a72c6c62266dce45e18810a73309900dd',
    77        'type' => 'plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'smaily/smaily_for_wp' => array(
    14             'pretty_version' => '3.1.2',
    15             'version' => '3.1.2.0',
    16             'reference' => '1f468101c333fae4d27b7f79f08fde4de3f35a09',
     14            'pretty_version' => '3.1.4',
     15            'version' => '3.1.4.0',
     16            'reference' => '91fe560a72c6c62266dce45e18810a73309900dd',
    1717            'type' => 'plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • smaily-for-wp/trunk/admin/class-smaily-for-wp-admin.php

    r2993727 r3220184  
    6666     */
    6767    public function enqueue_scripts() {
    68         wp_register_script( $this->plugin_name, SMLY4WP_PLUGIN_URL . '/admin/js/smaily-for-wp-admin.js', array( 'jquery' ), $this->version, false );
    69         wp_enqueue_script( $this->plugin_name );
    70         wp_add_inline_script( $this->plugin_name, 'var smaily_for_wp = ' . json_encode( array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) ) . ';' );
     68        $user = wp_get_current_user();
     69        if ( $user->has_cap( 'edit_plugins' ) ) {
     70            wp_register_script( $this->plugin_name, SMLY4WP_PLUGIN_URL . '/admin/js/smaily-for-wp-admin.js', array( 'jquery' ), $this->version, false );
     71            wp_enqueue_script( $this->plugin_name );
     72            wp_add_inline_script( $this->plugin_name, 'var smaily_for_wp = ' . json_encode( array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) ) . ';' );
     73        }
    7174    }
    7275
     
    121124        );
    122125
    123         wp_add_inline_script( $this->plugin_name, 'var autoresponders = ' . json_encode( $autoresponders ) . ';' );
     126        wp_add_inline_script( $this->plugin_name, sprintf( 'var autoresponders = JSON.stringify(%s);', wp_json_encode( $autoresponders ) ), 'before' );
    124127    }
    125128
     
    140143     */
    141144    public function smaily_admin_save() {
     145        $user = wp_get_current_user();
     146        if ( ! $user->has_cap( 'edit_plugins' ) ) {
     147            return;
     148        }
     149
    142150        // Allow only posted data.
    143151        if ( empty( $_POST ) ) {
  • smaily-for-wp/trunk/readme.txt

    r2993727 r3220184  
    44Requires PHP: 5.6
    55Requires at least: 4.0
    6 Stable tag: 3.1.2
     6Stable tag: 3.1.4
    77Tags: widget, plugin, sidebar, api, mail, email, marketing, smaily
    88Tested up to: 6.4
     
    7676
    7777== Changelog ==
     78
     79= 3.1.4 =
     80- Fix a security issue where users who didn't have correct privileges to edit the plugin settings were allowed to do so through console in administrators interface. https://www.cve.org/CVERecord?id=CVE-2024-54286
     81
     82= 3.1.3 =
     83- Fix an issue where blocks section is not rendering due to autoresponders JSON response bad formatting.
    7884
    7985= 3.1.2 =
  • smaily-for-wp/trunk/smaily-for-wp.php

    r2993727 r3220184  
    1010 * Text Domain:       smaily-for-wp
    1111 * Description:       Smaily newsletter subscription form.
    12  * Version:           3.1.2
     12 * Version:           3.1.4
    1313 * Author:            Sendsmaily LLC
    1414 * Author URI:        https://smaily.com
     
    2525 * Current plugin version.
    2626 */
    27 define( 'SMLY4WP_PLUGIN_VERSION', '3.1.2' );
     27define( 'SMLY4WP_PLUGIN_VERSION', '3.1.4' );
    2828
    2929/**
  • smaily-for-wp/trunk/vendor/composer/InstalledVersions.php

    r2887377 r3220184  
    323323
    324324        $installed = array();
     325        $copiedLocalDir = false;
    325326
    326327        if (self::$canGetVendors) {
     
    331332                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332333                    $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
    334                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335                         self::$installed = $installed[count($installed) - 1];
     334                    self::$installedByVendor[$vendorDir] = $required;
     335                    $installed[] = $required;
     336                    if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
     337                        self::$installed = $required;
     338                        $copiedLocalDir = true;
    336339                    }
    337340                }
     
    351354        }
    352355
    353         if (self::$installed !== array()) {
     356        if (self::$installed !== array() && !$copiedLocalDir) {
    354357            $installed[] = self::$installed;
    355358        }
  • smaily-for-wp/trunk/vendor/composer/installed.php

    r2993727 r3220184  
    22    'root' => array(
    33        'name' => 'smaily/smaily_for_wp',
    4         'pretty_version' => '3.1.2',
    5         'version' => '3.1.2.0',
    6         'reference' => '1f468101c333fae4d27b7f79f08fde4de3f35a09',
     4        'pretty_version' => '3.1.4',
     5        'version' => '3.1.4.0',
     6        'reference' => '91fe560a72c6c62266dce45e18810a73309900dd',
    77        'type' => 'plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'smaily/smaily_for_wp' => array(
    14             'pretty_version' => '3.1.2',
    15             'version' => '3.1.2.0',
    16             'reference' => '1f468101c333fae4d27b7f79f08fde4de3f35a09',
     14            'pretty_version' => '3.1.4',
     15            'version' => '3.1.4.0',
     16            'reference' => '91fe560a72c6c62266dce45e18810a73309900dd',
    1717            'type' => 'plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.