Plugin Directory

Changeset 2626593 for shapepress-dsgvo


Ignore:
Timestamp:
11/09/2021 09:58:06 AM (4 years ago)
Author:
legalweb
Message:

3.1.27

  • improved sanitation and escaping
  • fixed errors at unsubscribe and subject access request
Location:
shapepress-dsgvo/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • shapepress-dsgvo/trunk/README.txt

    r2619292 r2626593  
    55Requires at least: 3.0.1
    66Tested up to: 5.8.1
    7 Stable tag: 3.1.26
     7Stable tag: 3.1.27
    88Requires PHP: 5.6.0
    99License: GPLv2 or later
     
    204204
    205205== Changelog ==
     206= 3.1.27 =
     207* improved sanitation and escaping
     208* fixed errors at unsubscribe and subject access request
     209
    206210= 3.1.26 =
    207211* improved sanitation and escaping
  • shapepress-dsgvo/trunk/admin/js/sp-dsgvo-admin.js

    r2607104 r2626593  
    4848        $('.unsubscribe-dismiss').on('click tap', function() {
    4949            var $this = $(this),
    50                 id = $this.attr('data-id');
     50                id = $this.attr('data-id'),
     51                wpnonce = $this.attr('data-nonce');
    5152
    5253            if(confirm(args.dismiss_confirm)) {
     
    5455                $.post( args.ajaxurl, {
    5556                    action: 'admin-dismiss-unsubscribe',
    56                     id: id
     57                    id: id,
     58                    _wpnonce: wpnonce
    5759                },
    5860                function( data ) {
  • shapepress-dsgvo/trunk/admin/tabs/v3/subject-access-request/page.php

    r2606205 r2626593  
    195195                        <td class="column-dismiss">
    196196                            <svg class="unsubscribe-dismiss" width="10" height="10"
    197                                  data-id="<?php echo esc_attr($pendingRequest->ID); ?>">
     197                                 data-id="<?php echo esc_attr($pendingRequest->ID); ?>" data-nonce="<?php echo wp_create_nonce(SPDSGVODismissUnsubscribeAction::getActionName() . '-nonce'); ?>">
    198198                                <line x1="0" y1="0" x2="10" y2="10"/>
    199199                                <line x1="0" y1="10" x2="10" y2="0"/>
  • shapepress-dsgvo/trunk/admin/tabs/v3/super-unsubscribe/class-sp-dsgvo-dismiss-unsubscribe-action.php

    r2607332 r2626593  
    1111
    1212        $id = $this->get('id');
    13         if (is_numeric()) {
     13        if (is_numeric($id)) {
    1414            $postType = get_post_type($id );
    15             if ($postType == "subjectaccessrequest") {
     15            if ($postType == "subjectaccessrequest" || $postType == "spdsgvo_unsubscriber") {
    1616                wp_delete_post( $id );
    1717            }
  • shapepress-dsgvo/trunk/admin/tabs/v3/super-unsubscribe/page.php

    r2606205 r2626593  
    319319                            <span class="wpk-services-table-name"><?php _e('Dismiss', 'shapepress-dsgvo') ?></span>
    320320                            <svg class="unsubscribe-dismiss" width="10" height="10"
    321                                  data-id="<?php echo esc_attr($confirmedRequest->ID); ?>">
     321                                 data-id="<?php echo esc_attr($confirmedRequest->ID); ?>" data-nonce="<?php echo wp_create_nonce(SPDSGVODismissUnsubscribeAction::getActionName() . '-nonce'); ?>">
    322322                                <line x1="0" y1="0" x2="10" y2="10"/>
    323323                                <line x1="0" y1="10" x2="10" y2="0"/>
  • shapepress-dsgvo/trunk/includes/class-sp-dsgvo-ajax-action.php

    r2619292 r2626593  
    178178
    179179            if(is_array($_REQUEST[$key])){
    180                 return $this->recursive_sanitize_text_field($_REQUEST[$key]);
     180                return spDsgvo_recursive_sanitize_text_field($_REQUEST[$key]);
    181181            }
    182182
     
    227227    }
    228228
    229     /**
    230     * Recursive sanitation for an array
    231     * @param $array
    232     * @return mixed
    233     */
    234     function recursive_sanitize_text_field($array) {
    235         foreach ( $array as $key => &$value ) {
    236             if ( is_array( $value ) ) {
    237                 $value = recursive_sanitize_text_field($value);
    238             }
    239             else {
    240                 $value = sanitize_text_field( $value );
    241             }
    242         }
    243 
    244         return $array;
    245     }
     229
    246230
    247231    public function returnBack(){
  • shapepress-dsgvo/trunk/includes/class-sp-dsgvo-embedding-api-base.php

    r2606205 r2626593  
    154154
    155155        // the settings are stored in an array like  "integration-slug" => '0'
    156         $integrationSettings = json_decode(sanitize_text_field(stripslashes($_COOKIE[SPDSGVOConstants::CCOKIE_NAME])));
     156        $integrationSettings = (json_decode(stripslashes($_COOKIE[SPDSGVOConstants::CCOKIE_NAME])));
    157157        // check if it is a class and has the property
    158158        if ($integrationSettings instanceof stdClass  == false || !property_exists($integrationSettings, 'integrations')) return false;
    159159
    160         $enabledIntegrations = filter_var_array($integrationSettings->integrations,FILTER_SANITIZE_ENCODED);
     160        $integrationSettingsArray = (array)$integrationSettings;
     161        $integrationSettingsArray = spDsgvo_recursive_sanitize_text_field($integrationSettingsArray);
     162
     163        $enabledIntegrations = $integrationSettingsArray['integrations'];//filter_var_array($integrationSettings->integrations,FILTER_SANITIZE_ENCODED);
    161164        $integrationSettings = null; // we only need here the array of enabled integrations, which we sanitze and filter in the above lines. the rest gets nulled
    162165        if ($enabledIntegrations == false || isset($enabledIntegrations) == false) return false;
  • shapepress-dsgvo/trunk/includes/class-sp-dsgvo-integration-api-base.php

    r2606205 r2626593  
    223223
    224224        // the settings are stored in an array like  "integration-slug" => '0'
    225         $integrationSettings = json_decode(sanitize_text_field(stripslashes($_COOKIE[SPDSGVOConstants::CCOKIE_NAME])));
     225        $integrationSettings = sanitize_text_field(json_decode(stripslashes($_COOKIE[SPDSGVOConstants::CCOKIE_NAME])));
    226226        // check if it is a class and has the property
    227227        if ($integrationSettings instanceof stdClass  == false || !property_exists($integrationSettings, 'integrations')) return false;
  • shapepress-dsgvo/trunk/includes/helpers.php

    r2606205 r2626593  
    237237}
    238238
     239/**
     240 * Recursive sanitation for an array
     241 * @param $array
     242 * @return mixed
     243 */
     244if (! function_exists('spDsgvo_recursive_sanitize_text_field')) {
     245    function spDsgvo_recursive_sanitize_text_field( $array ) {
     246        foreach ( $array as $key => &$value ) {
     247            if ( is_array( $value ) ) {
     248                $value = recursive_sanitize_text_field( $value );
     249            } else {
     250                $value = sanitize_text_field( $value );
     251            }
     252        }
     253
     254        return $array;
     255    }
     256}
     257
    239258if (! function_exists('spDsgvoWriteInput')) {
    240259    /**
  • shapepress-dsgvo/trunk/public/shortcodes/subject-access-request/subject-access-request.php

    r2606205 r2626593  
    1414    ob_start();
    1515    ?> 
    16         <?php if(isset($_REQUEST['result']) && santize_text_field($_REQUEST['result']) === 'success'): ?>
     16        <?php if(isset($_REQUEST['result']) && (sanitize_text_field($_REQUEST['result'])) === 'success'): ?>
    1717
    1818            <p class="sp-dsgvo sar-success-message"><?php _e('Your request has been created','shapepress-dsgvo')?> <br> <?php _e('You will receive an email from us with a current extract of your data stored with us.','shapepress-dsgvo')?></p>
  • shapepress-dsgvo/trunk/public/shortcodes/super-unsubscribe/unsubscribe-form.php

    r2606205 r2626593  
    1515    ob_start();
    1616    ?> 
    17         <?php if(isset($_REQUEST['result']) && santize_text_field($_REQUEST['result']) === 'success'): ?>
     17        <?php if(isset($_REQUEST['result']) && (sanitize_text_field($_REQUEST['result'])) === 'success'): ?>
    1818
    1919            <p class="sp-dsgvo us-success-message"><?php _e('Request sent successfully. You will receive an email in a few minutes.','shapepress-dsgvo')?></p>
    2020
    21         <?php elseif(isset($_REQUEST['result']) && santize_text_field($_REQUEST['result']) === 'confirmed'): ?>
     21        <?php elseif(isset($_REQUEST['result']) && sanitize_text_field($_REQUEST['result']) === 'confirmed'): ?>
    2222
    2323            <p class="sp-dsgvo us-success-message"><?php _e('Request successfully completed. Your data has been completely deleted.','shapepress-dsgvo')?></p>
  • shapepress-dsgvo/trunk/sp-dsgvo.php

    r2619292 r2626593  
    1717 * Plugin URI:        https://legalweb.io
    1818 * Description:       WP DSGVO Tools (GDPR) help you to fulfill the GDPR (DGSVO)  compliance guidance (<a target="_blank" href="https://ico.org.uk/for-organisations/data-protection-reform/overview-of-the-gdpr/">GDPR</a>)
    19  * Version:           3.1.26
     19 * Version:           3.1.27
    2020 * Author:            legalweb
    2121 * Author URI:        https://www.legalweb.io
     
    2929}
    3030
    31 define('sp_dsgvo_VERSION', '3.1.26');
     31define('sp_dsgvo_VERSION', '3.1.27');
    3232define('sp_dsgvo_NAME', 'sp-dsgvo');
    3333define('sp_dsgvo_PLUGIN_NAME', 'shapepress-dsgvo');
Note: See TracChangeset for help on using the changeset viewer.