Plugin Directory

Changeset 3816011


Ignore:
Timestamp:
11/22/2026 01:38:04 AM (2 hours ago)
Author:
websoudan
Message:

Update to version 5.1.9 from GitHub

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

Legend:

Unmodified
Added
Removed
  • mw-wp-form/tags/5.1.9/classes/models/class.csv.php

    r2968966 r3816011  
    8282                foreach ( $rows as $row ) {
    8383                        foreach ( $row as $column_name => $column ) {
    84                                 $row[ $column_name ] = $this->_escape_double_quote( $column );
     84                                $row[ $column_name ] = $this->_escape_double_quote( $this->_escape_leading_character( $column ) );
    8585                        }
    8686                        $csv .= implode( ',', $row ) . "\r\n";
    … …  
    219219
    220220        /**
     221         * Prefix a single quote to values starting with a special character.
     222         *
     223         * @param mixed $value Value.
     224         * @return string
     225         */
     226        protected function _escape_leading_character( $value ) {
     227                $value = (string) $value;
     228                if ( '' !== $value && false !== strpos( "=+-@\t\r\n", $value[0] ) ) {
     229                        $value = "'" . $value;
     230                }
     231                return $value;
     232        }
     233
     234        /**
    221235         * Escape double quotes.
    222236         *
  • mw-wp-form/tags/5.1.9/classes/models/class.session.php

    r3516013 r3816011  
    1919
    2020        /**
     21         * Transient name.
     22         *
    2123         * @var string
    2224         */
    … …  
    3840                $this->name = MWF_Config::NAME . '_session_' . $name;
    3941
    40                 if ( isset( $_COOKIE[ $this->name ] ) ) {
     42                $session_id = false;
     43                if ( isset( $_COOKIE[ $this->name ] ) && preg_match( '/\A[0-9a-f]{40}\z/', $_COOKIE[ $this->name ] ) ) {
    4144                        $session_id = $_COOKIE[ $this->name ];
    42                 } else {
     45                }
     46
     47                if ( ! $session_id ) {
    4348                        $session_id = sha1( wp_create_nonce( $this->name ) . ip2long( $this->get_remote_addr() ) . uniqid() );
    4449                        $secure     = apply_filters( 'mwform_secure_cookie', is_ssl() );
    … …  
    6267                }
    6368
    64                 $this->session_id = $session_id;
     69                $this->session_id = MWF_Config::NAME . '_session_' . $session_id;
    6570        }
    6671
  • mw-wp-form/tags/5.1.9/mw-wp-form.php

    r3715473 r3816011  
    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.8
     6 * Version: 5.1.9
    77 * Requires at least: 6.0
    88 * Requires PHP: 8.0
  • mw-wp-form/tags/5.1.9/readme.txt

    r3715473 r3816011  
    66Requires PHP: 8.0
    77Tested up to: 6.4
    8 Stable tag: 5.1.8
     8Stable tag: 5.1.9
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8282== Changelog ==
    8383
     84= 5.1.9 =
     85* Security Hardened session handling
     86* Security Hardened CSV export
     87
    8488= 5.1.8 =
    8589* Security Tighten access control on post reference handling via query string (re-release of 5.1.7, which was not delivered due to a missing Stable tag update)
  • mw-wp-form/trunk/classes/models/class.csv.php

    r2968966 r3816011  
    8282                foreach ( $rows as $row ) {
    8383                        foreach ( $row as $column_name => $column ) {
    84                                 $row[ $column_name ] = $this->_escape_double_quote( $column );
     84                                $row[ $column_name ] = $this->_escape_double_quote( $this->_escape_leading_character( $column ) );
    8585                        }
    8686                        $csv .= implode( ',', $row ) . "\r\n";
    … …  
    219219
    220220        /**
     221         * Prefix a single quote to values starting with a special character.
     222         *
     223         * @param mixed $value Value.
     224         * @return string
     225         */
     226        protected function _escape_leading_character( $value ) {
     227                $value = (string) $value;
     228                if ( '' !== $value && false !== strpos( "=+-@\t\r\n", $value[0] ) ) {
     229                        $value = "'" . $value;
     230                }
     231                return $value;
     232        }
     233
     234        /**
    221235         * Escape double quotes.
    222236         *
  • mw-wp-form/trunk/classes/models/class.session.php

    r3516013 r3816011  
    1919
    2020        /**
     21         * Transient name.
     22         *
    2123         * @var string
    2224         */
    … …  
    3840                $this->name = MWF_Config::NAME . '_session_' . $name;
    3941
    40                 if ( isset( $_COOKIE[ $this->name ] ) ) {
     42                $session_id = false;
     43                if ( isset( $_COOKIE[ $this->name ] ) && preg_match( '/\A[0-9a-f]{40}\z/', $_COOKIE[ $this->name ] ) ) {
    4144                        $session_id = $_COOKIE[ $this->name ];
    42                 } else {
     45                }
     46
     47                if ( ! $session_id ) {
    4348                        $session_id = sha1( wp_create_nonce( $this->name ) . ip2long( $this->get_remote_addr() ) . uniqid() );
    4449                        $secure     = apply_filters( 'mwform_secure_cookie', is_ssl() );
    … …  
    6267                }
    6368
    64                 $this->session_id = $session_id;
     69                $this->session_id = MWF_Config::NAME . '_session_' . $session_id;
    6570        }
    6671
  • mw-wp-form/trunk/mw-wp-form.php

    r3715473 r3816011  
    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.8
     6 * Version: 5.1.9
    77 * Requires at least: 6.0
    88 * Requires PHP: 8.0
  • mw-wp-form/trunk/readme.txt

    r3715473 r3816011  
    66Requires PHP: 8.0
    77Tested up to: 6.4
    8 Stable tag: 5.1.8
     8Stable tag: 5.1.9
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8282== Changelog ==
    8383
     84= 5.1.9 =
     85* Security Hardened session handling
     86* Security Hardened CSV export
     87
    8488= 5.1.8 =
    8589* Security Tighten access control on post reference handling via query string (re-release of 5.1.7, which was not delivered due to a missing Stable tag update)
Note: See TracChangeset for help on using the changeset viewer.