Plugin Directory

Changeset 2375366


Ignore:
Timestamp:
09/04/2020 04:44:59 PM (5 years ago)
Author:
activecampaign
Message:

CSRF fix, invalid cookie attribute fix

Location:
activecampaign-subscription-forms/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • activecampaign-subscription-forms/trunk/README.md

    r2363354 r2375366  
    7272## Changelog
    7373
     74### 8.0.2
     75* Security fix to address CSRF vulnerability
     76* General fix to address browser warning for invalid cookie attribute
     77
    7478### 8.0.1
    7579* removing php 7 feature usage
  • activecampaign-subscription-forms/trunk/activecampaign.php

    r2363354 r2375366  
    55Description: Allows you to add ActiveCampaign contact forms to any post, page, or sidebar. Also allows you to embed <a href="http://www.activecampaign.com/help/site-event-tracking/" target="_blank">ActiveCampaign site tracking</a> code in your pages. To get started, please activate the plugin and add your <a href="http://www.activecampaign.com/help/using-the-api/" target="_blank">API credentials</a> in the <a href="options-general.php?page=activecampaign">plugin settings</a>.
    66Author: ActiveCampaign
    7 Version: 8.0.1
     7Version: 8.0.2
    88Author URI: http://www.activecampaign.com
    99*/
     
    4949## version 8.0.0: Update ActiveCampaign forms embed to be compatible with Gutenberg editor, Resolve account connection UI bug
    5050## version 8.0.1: Removing php 7 feature usage
     51## version: 8.0.2: Security fix to address CSRF vulnerability, general fix to address browser warning for invalid cookie attribute
    5152
    5253define("ACTIVECAMPAIGN_URL", "");
     
    5455require_once(dirname(__FILE__) . "/activecampaign-api-php/ActiveCampaign.class.php");
    5556require_once(dirname(__FILE__) . "/activecampaign-form-block/activecampaign-form-block.php");
     57require_once( ABSPATH . 'wp-includes/pluggable.php' );
    5658
    5759/**
     
    134136
    135137        if ($_POST["api_url"] && $_POST["api_key"]) {
     138            //Nonce check for preventing CSRF
     139            if (isset($_REQUEST["_wpnonce"])) {
     140                $nonce = $_REQUEST["_wpnonce"];
     141            } else {
     142                $nonce = wp_create_nonce( "invalid_nonce" );
     143            }
     144            if ( ! wp_verify_nonce( $nonce, "activecampaign_save_settings" ) ) {
     145                exit;
     146            }
     147
    136148
    137149            $ac = new ActiveCampaignWordPress($_POST["api_url"], $_POST["api_key"]);
     
    511523
    512524            <p><button type="submit" style="font-size: 16px; margin-top: 25px; padding: 10px;"><?php echo __($button_value, "menu-activecampaign"); ?></button></p>
    513 
    514         </form>
     525            <?php wp_nonce_field( 'activecampaign_save_settings' ); ?>
     526
     527        </form>
    515528
    516529        <?php
  • activecampaign-subscription-forms/trunk/readme.txt

    r2363354 r2375366  
    8989== Changelog ==
    9090
     91= 8.0.2 =
     92* Security fix to address CSRF vulnerability
     93* General fix to address browser warning for invalid cookie attribute
     94
    9195= 8.0.1 =
    9296* removing php 7 feature usage
  • activecampaign-subscription-forms/trunk/site_tracking.js

    r2054237 r2375366  
    1313    function acEnableTracking() {
    1414        var expiration = new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * 30);
    15         document.cookie = "ac_enable_tracking=1; expires= " + expiration + "; path=/";
     15        document.cookie = "ac_enable_tracking=1;samesite=none;secure; expires= " + expiration + "; path=/";
    1616        pgo('process', 'allowTracking');
    1717    }
Note: See TracChangeset for help on using the changeset viewer.