Plugin Directory

Changeset 3279082


Ignore:
Timestamp:
04/22/2025 01:05:17 PM (11 months ago)
Author:
paystack
Message:

Add extra sanitization to form fields

Location:
payment-forms-for-paystack/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • payment-forms-for-paystack/trunk/README.md

    r3163958 r3279082  
    33# Payment Forms for Paystack
    44
    5 Welcome to the Paysment Forms for Paystack repository on GitHub. Here you can browse the source, look at open issues and keep track of development.
     5Welcome to the Payment Forms for Paystack repository on GitHub. Here you can browse the source, look at open issues and keep track of development.
    66
    77If you are a developer, you can join our Developer Community on [Slack](https://slack.paystack.com).
  • payment-forms-for-paystack/trunk/includes/classes/class-field-shortcodes.php

    r3210130 r3279082  
    4444            'text'
    4545        );
    46    
     46
     47        // sanitize name attribute before using it
     48        $atts['name'] = sanitize_text_field( esc_attr( esc_html__($atts['name']) ) );
     49
    4750        // translators: %s: input field name to be entered by the user
    4851        $name     = sanitize_text_field( sprintf( esc_attr__( 'Enter %s', 'pff-paystack' ), $atts['name'] ) );
     
    7073     */
    7174    public function textarea_field( $atts ) {
     75       
    7276        $atts = shortcode_atts(
    7377            array(
     
    7882            'textarea'
    7983        );
    80 
     84        // sanitize name attribute before using it
     85        $atts['name'] = sanitize_text_field( esc_attr( esc_html__($atts['name']) ) );       
     86       
    8187        // translators: %s: textarea field to be entered by the user
    8288        $name     = sanitize_text_field( sprintf( esc_attr__( 'Enter %s', 'pff-paystack' ), $atts['name'] ) );
     
    157163            'input'
    158164        );
    159 
     165       
     166        $atts['name'] = sanitize_text_field( esc_attr( esc_html__($atts['name']) ) );
     167       
    160168        $name       = sanitize_text_field( $atts['name'] );
    161169        $required   = $atts['required'] === 'required' ? 'required' : '';
     
    196204            'datepicker'
    197205        );
    198    
     206
     207        // sanitize name attribute before using it
     208        $atts['name'] = sanitize_text_field( esc_attr( esc_html__($atts['name']) ) );
     209           
    199210        // translators: %s: datepicker field to be selected by the user
    200211        $name     = sanitize_text_field( sprintf( esc_attr__( 'Enter %s', 'pff-paystack' ), $atts['name'] ) );
     
    272283            'radio'
    273284        );
    274    
     285       
    275286        $name     = sanitize_text_field( $atts['name'] );
    276287        $options  = array_map( 'sanitize_text_field', explode( ',', $atts['options'] ) );
  • payment-forms-for-paystack/trunk/includes/classes/class-settings.php

    r3210130 r3279082  
    192192        return $result;
    193193    }
     194
     195    /**
     196     * Sanitises the field name
     197     *
     198     * @param string $value
     199     * @return string
     200     *
     201     */
     202    private function sanitise_field( $value ) {
     203        return sanitize_text_field( $value );
     204    }
    194205}
  • payment-forms-for-paystack/trunk/paystack-forms.php

    r3238170 r3279082  
    44  Plugin URI:   https://github.com/PaystackHQ/Wordpress-Payment-forms-for-Paystack
    55  Description:  Payment Forms for Paystack allows you create forms that will be used to bill clients for goods and services via Paystack.
    6   Version:      4.0.2
     6  Version:      4.0.3
    77  Author:       Paystack
    88  Author URI:   http://paystack.com
     
    1717define( 'PFF_PAYSTACK_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    1818define( 'PFF_PAYSTACK_MAIN_FILE', __FILE__ );
    19 define( 'PFF_PAYSTACK_VERSION', '4.0.2' );
     19define( 'PFF_PAYSTACK_VERSION', '4.0.3' );
    2020define( 'PFF_PAYSTACK_TABLE', 'paystack_forms_payments' );
    2121define( 'PFF_PLUGIN_BASENAME', plugin_basename(__FILE__) );
  • payment-forms-for-paystack/trunk/readme.txt

    r3273581 r3279082  
    55Requires at least: 5.0
    66Tested up to: 6.7
    7 Stable tag: 4.0.2
     7Stable tag: 4.0.3
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    9292
    9393== Changelog ==
     94= 4.0.3 =
     95* Security update - Add extra sanitization to form fields
     96
    9497= 4.0.2 =
    9598* Security Update - Adding in sanitization to the Payments List order variable.
Note: See TracChangeset for help on using the changeset viewer.