Plugin Directory

Changeset 3491682


Ignore:
Timestamp:
03/26/2026 10:37:14 AM (44 hours ago)
Author:
mt8.biz
Message:

Update to version 5.1.1 from GitHub

Location:
mw-wp-form
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • mw-wp-form/tags/5.1.1/classes/functions.php

    r2968966 r3491682  
    4444     * Unify line feed code to \n.
    4545     *
    46      * @param sring $string String.
     46     * @param string|null $string String.
    4747     * @return string
    4848     */
    4949    public static function convert_eol( $string ) {
    50         return preg_replace( "/\r\n|\r|\n/", "\n", $string );
     50        return is_string( $string ) ? preg_replace( "/\r\n|\r|\n/", "\n", $string ) : '';
    5151    }
    5252
  • mw-wp-form/tags/5.1.1/classes/models/class.akismet.php

    r2968966 r3491682  
    108108        }
    109109
    110         $query_string = http_build_query( $akismet, null, '&' );
     110        $query_string = http_build_query( $akismet, '', '&' );
    111111        if ( is_callable( array( 'Akismet', 'http_post' ) ) ) {
    112112            $response = Akismet::http_post( $query_string, 'comment-check' );
  • mw-wp-form/tags/5.1.1/classes/models/class.directory.php

    r2968966 r3491682  
    146146        }
    147147
    148         $filepath = path_join( $user_file_dir, $filename );
     148        $normalized_filename = wp_normalize_path( $filename );
     149        if (
     150            wp_basename( $normalized_filename ) !== $normalized_filename ||
     151            strstr( $normalized_filename, "\0" )
     152        ) {
     153            throw new \RuntimeException( '[MW WP Form] Invalid file reference requested.' );
     154        }
     155
     156        $filepath      = path_join( $user_file_dir, $filename );
     157        $filepath      = wp_normalize_path( $filepath );
     158        $user_file_dir = trailingslashit( wp_normalize_path( $user_file_dir ) );
     159
     160        if ( 0 !== strpos( $filepath, $user_file_dir ) ) {
     161            throw new \RuntimeException( '[MW WP Form] Invalid file reference requested.' );
     162        }
    149163
    150164        if ( str_contains( $filepath, '../' ) || str_contains( $filepath, '..' . DIRECTORY_SEPARATOR ) ) {
  • mw-wp-form/tags/5.1.1/classes/services/class.redirected.php

    r2968966 r3491682  
    172172
    173173        if ( ! empty( $query_string ) ) {
    174             return $url . '?' . http_build_query( $query_string, null, '&', PHP_QUERY_RFC3986 );
     174            return $url . '?' . http_build_query( $query_string, '', '&', PHP_QUERY_RFC3986 );
    175175        }
    176176
  • mw-wp-form/tags/5.1.1/mw-wp-form.php

    r3050147 r3491682  
    44 * Plugin URI: https://mw-wp-form.web-soudan.co.jp
    55 * Description: MW WP Form is shortcode base contact form plugin. This plugin have many features. For example you can use many validation rules, inquiry data saving, and chart aggregation using saved inquiry data.
    6  * Version: 5.1.0
     6 * Version: 5.1.1
    77 * Requires at least: 6.0
     8 * Requires PHP: 8.0
    89 * Author: websoudan
    910 * Author URI: https://web-soudan.co.jp/
  • mw-wp-form/tags/5.1.1/readme.txt

    r3050147 r3491682  
    44Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
    55Requires at least: 6.0
     6Requires PHP: 8.0
    67Tested up to: 6.4
    7 Stable tag: 5.1.0
     8Stable tag: 5.1.1
    89License: GPLv2 or later
    910License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8182== Changelog ==
    8283
     84= 5.1.1 =
     85* Security Fix insufficient file path validation in upload file handling
     86
    8387= 5.1.0 =
    8488* Security Use wp_kses_post to form content/complete message
     
    9599
    96100= 5.0.3 =
    97 * Remove plugin asset files. 
     101* Remove plugin asset files.
    98102
    99103= 5.0.2 =
  • mw-wp-form/trunk/classes/functions.php

    r2968966 r3491682  
    4444     * Unify line feed code to \n.
    4545     *
    46      * @param sring $string String.
     46     * @param string|null $string String.
    4747     * @return string
    4848     */
    4949    public static function convert_eol( $string ) {
    50         return preg_replace( "/\r\n|\r|\n/", "\n", $string );
     50        return is_string( $string ) ? preg_replace( "/\r\n|\r|\n/", "\n", $string ) : '';
    5151    }
    5252
  • mw-wp-form/trunk/classes/models/class.akismet.php

    r2968966 r3491682  
    108108        }
    109109
    110         $query_string = http_build_query( $akismet, null, '&' );
     110        $query_string = http_build_query( $akismet, '', '&' );
    111111        if ( is_callable( array( 'Akismet', 'http_post' ) ) ) {
    112112            $response = Akismet::http_post( $query_string, 'comment-check' );
  • mw-wp-form/trunk/classes/models/class.directory.php

    r2968966 r3491682  
    146146        }
    147147
    148         $filepath = path_join( $user_file_dir, $filename );
     148        $normalized_filename = wp_normalize_path( $filename );
     149        if (
     150            wp_basename( $normalized_filename ) !== $normalized_filename ||
     151            strstr( $normalized_filename, "\0" )
     152        ) {
     153            throw new \RuntimeException( '[MW WP Form] Invalid file reference requested.' );
     154        }
     155
     156        $filepath      = path_join( $user_file_dir, $filename );
     157        $filepath      = wp_normalize_path( $filepath );
     158        $user_file_dir = trailingslashit( wp_normalize_path( $user_file_dir ) );
     159
     160        if ( 0 !== strpos( $filepath, $user_file_dir ) ) {
     161            throw new \RuntimeException( '[MW WP Form] Invalid file reference requested.' );
     162        }
    149163
    150164        if ( str_contains( $filepath, '../' ) || str_contains( $filepath, '..' . DIRECTORY_SEPARATOR ) ) {
  • mw-wp-form/trunk/classes/services/class.redirected.php

    r2968966 r3491682  
    172172
    173173        if ( ! empty( $query_string ) ) {
    174             return $url . '?' . http_build_query( $query_string, null, '&', PHP_QUERY_RFC3986 );
     174            return $url . '?' . http_build_query( $query_string, '', '&', PHP_QUERY_RFC3986 );
    175175        }
    176176
  • mw-wp-form/trunk/mw-wp-form.php

    r3050147 r3491682  
    44 * Plugin URI: https://mw-wp-form.web-soudan.co.jp
    55 * Description: MW WP Form is shortcode base contact form plugin. This plugin have many features. For example you can use many validation rules, inquiry data saving, and chart aggregation using saved inquiry data.
    6  * Version: 5.1.0
     6 * Version: 5.1.1
    77 * Requires at least: 6.0
     8 * Requires PHP: 8.0
    89 * Author: websoudan
    910 * Author URI: https://web-soudan.co.jp/
  • mw-wp-form/trunk/readme.txt

    r3050147 r3491682  
    44Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
    55Requires at least: 6.0
     6Requires PHP: 8.0
    67Tested up to: 6.4
    7 Stable tag: 5.1.0
     8Stable tag: 5.1.1
    89License: GPLv2 or later
    910License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8182== Changelog ==
    8283
     84= 5.1.1 =
     85* Security Fix insufficient file path validation in upload file handling
     86
    8387= 5.1.0 =
    8488* Security Use wp_kses_post to form content/complete message
     
    9599
    96100= 5.0.3 =
    97 * Remove plugin asset files. 
     101* Remove plugin asset files.
    98102
    99103= 5.0.2 =
Note: See TracChangeset for help on using the changeset viewer.