Plugin Directory

Changeset 3448005


Ignore:
Timestamp:
01/27/2026 03:40:02 PM (6 weeks ago)
Author:
themeisle
Message:

Update to version 2.7.2 from GitHub

Location:
insert-php
Files:
6 deleted
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • insert-php/tags/2.7.2/CHANGELOG.md

    r3443800 r3448005  
     1#####   Version 2.7.2 (2026-01-27)
     2
     3- This release focuses on improving the security and robustness of snippet type handling in the codebase.
     4
    15#####   Version 2.7.1 (2026-01-21)
    26
  • insert-php/tags/2.7.2/includes/class.helpers.php

    r3442510 r3448005  
    159159     * @param mixed $post_id Post ID.
    160160     *
    161      * @return array|mixed|string
     161     * @return string|false Snippet type string, or false if post is not a valid snippet post type or not found.
    162162     */
    163163    public static function get_snippet_type( $post_id = null ) {
     
    175175        if ( ! empty( $post_id ) ) {
    176176            $_post = get_post( $post_id );
     177           
     178            // Security: Validate that the post belongs to the snippet post type
     179            // to prevent arbitrary post content execution via shortcodes.
     180            if ( empty( $_post ) || WINP_SNIPPETS_POST_TYPE !== $_post->post_type ) {
     181                return false;
     182            }
    177183        }
    178184
  • insert-php/tags/2.7.2/includes/shortcodes/shortcodes.php

    r3442510 r3448005  
    153153        $id = isset( $attr['id'] ) ? (int) $attr['id'] : null;
    154154
    155         if ( $id && WINP_Helper::get_snippet_type( $id ) !== $type ) {
    156             $id = 0;
     155        $snippet_type = null;
     156
     157        // Only resolve snippet type when a valid (truthy) ID is provided to avoid
     158        // unnecessary request parsing or database lookups for invalid IDs.
     159        if ( $id ) {
     160            $snippet_type = WINP_Helper::get_snippet_type( $id );
     161
     162            // Security: Reject if get_snippet_type() returned false (invalid post type)
     163            // or if the snippet type doesn't match the expected type.
     164            if ( false === $snippet_type || $snippet_type !== $type ) {
     165                $id = 0;
     166            }
    157167        }
    158168
  • insert-php/tags/2.7.2/insert_php.php

    r3443800 r3448005  
    55 * Description: Executes PHP code, uses conditional logic to insert ads, text, media content and external service's code. Ensures no content duplication.
    66 * Author: Themeisle
    7  * Version: 2.7.1
     7 * Version: 2.7.2
    88 * WordPress Available:  yes
    99 * Requires License:    no
     
    4242define( 'WINP_PLUGIN_ACTIVE', true );
    4343
    44 define( 'WINP_PLUGIN_VERSION', '2.6.1' );
     44define( 'WINP_PLUGIN_VERSION', '2.7.2' );
    4545
    4646// Root directory of the plugin.
  • insert-php/tags/2.7.2/readme.txt

    r3445479 r3448005  
    55Tested up to: 6.9
    66Requires PHP: 7.0
    7 Stable tag: 2.7.1
     7Stable tag: 2.7.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    281281
    282282== Changelog ==
     283
     284#####   Version 2.7.2 (2026-01-27)
     285
     286- This release focuses on improving the security and robustness of snippet type handling in the codebase.
     287
     288
     289
    283290
    284291#####   Version 2.7.1 (2026-01-21)
  • insert-php/tags/2.7.2/vendor/composer/installed.php

    r3443800 r3448005  
    22    'root' => array(
    33        'name' => 'codeinwp/insert-php',
    4         'pretty_version' => 'v2.7.1',
    5         'version' => '2.7.1.0',
    6         'reference' => 'bcad6f4886fc15c40b9ea61b3e9e94af766ee790',
     4        'pretty_version' => 'v2.7.2',
     5        'version' => '2.7.2.0',
     6        'reference' => 'bc59d77ab35704dae54f5589e1f2871c43b10148',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'codeinwp/insert-php' => array(
    14             'pretty_version' => 'v2.7.1',
    15             'version' => '2.7.1.0',
    16             'reference' => 'bcad6f4886fc15c40b9ea61b3e9e94af766ee790',
     14            'pretty_version' => 'v2.7.2',
     15            'version' => '2.7.2.0',
     16            'reference' => 'bc59d77ab35704dae54f5589e1f2871c43b10148',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • insert-php/trunk/CHANGELOG.md

    r3443800 r3448005  
     1#####   Version 2.7.2 (2026-01-27)
     2
     3- This release focuses on improving the security and robustness of snippet type handling in the codebase.
     4
    15#####   Version 2.7.1 (2026-01-21)
    26
  • insert-php/trunk/includes/class.helpers.php

    r3442510 r3448005  
    159159     * @param mixed $post_id Post ID.
    160160     *
    161      * @return array|mixed|string
     161     * @return string|false Snippet type string, or false if post is not a valid snippet post type or not found.
    162162     */
    163163    public static function get_snippet_type( $post_id = null ) {
     
    175175        if ( ! empty( $post_id ) ) {
    176176            $_post = get_post( $post_id );
     177           
     178            // Security: Validate that the post belongs to the snippet post type
     179            // to prevent arbitrary post content execution via shortcodes.
     180            if ( empty( $_post ) || WINP_SNIPPETS_POST_TYPE !== $_post->post_type ) {
     181                return false;
     182            }
    177183        }
    178184
  • insert-php/trunk/includes/shortcodes/shortcodes.php

    r3442510 r3448005  
    153153        $id = isset( $attr['id'] ) ? (int) $attr['id'] : null;
    154154
    155         if ( $id && WINP_Helper::get_snippet_type( $id ) !== $type ) {
    156             $id = 0;
     155        $snippet_type = null;
     156
     157        // Only resolve snippet type when a valid (truthy) ID is provided to avoid
     158        // unnecessary request parsing or database lookups for invalid IDs.
     159        if ( $id ) {
     160            $snippet_type = WINP_Helper::get_snippet_type( $id );
     161
     162            // Security: Reject if get_snippet_type() returned false (invalid post type)
     163            // or if the snippet type doesn't match the expected type.
     164            if ( false === $snippet_type || $snippet_type !== $type ) {
     165                $id = 0;
     166            }
    157167        }
    158168
  • insert-php/trunk/insert_php.php

    r3443800 r3448005  
    55 * Description: Executes PHP code, uses conditional logic to insert ads, text, media content and external service's code. Ensures no content duplication.
    66 * Author: Themeisle
    7  * Version: 2.7.1
     7 * Version: 2.7.2
    88 * WordPress Available:  yes
    99 * Requires License:    no
     
    4242define( 'WINP_PLUGIN_ACTIVE', true );
    4343
    44 define( 'WINP_PLUGIN_VERSION', '2.6.1' );
     44define( 'WINP_PLUGIN_VERSION', '2.7.2' );
    4545
    4646// Root directory of the plugin.
  • insert-php/trunk/readme.txt

    r3445479 r3448005  
    55Tested up to: 6.9
    66Requires PHP: 7.0
    7 Stable tag: 2.7.1
     7Stable tag: 2.7.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    281281
    282282== Changelog ==
     283
     284#####   Version 2.7.2 (2026-01-27)
     285
     286- This release focuses on improving the security and robustness of snippet type handling in the codebase.
     287
     288
     289
    283290
    284291#####   Version 2.7.1 (2026-01-21)
  • insert-php/trunk/vendor/composer/installed.php

    r3443800 r3448005  
    22    'root' => array(
    33        'name' => 'codeinwp/insert-php',
    4         'pretty_version' => 'v2.7.1',
    5         'version' => '2.7.1.0',
    6         'reference' => 'bcad6f4886fc15c40b9ea61b3e9e94af766ee790',
     4        'pretty_version' => 'v2.7.2',
     5        'version' => '2.7.2.0',
     6        'reference' => 'bc59d77ab35704dae54f5589e1f2871c43b10148',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'codeinwp/insert-php' => array(
    14             'pretty_version' => 'v2.7.1',
    15             'version' => '2.7.1.0',
    16             'reference' => 'bcad6f4886fc15c40b9ea61b3e9e94af766ee790',
     14            'pretty_version' => 'v2.7.2',
     15            'version' => '2.7.2.0',
     16            'reference' => 'bc59d77ab35704dae54f5589e1f2871c43b10148',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.