Plugin Directory

Changeset 3320426


Ignore:
Timestamp:
07/01/2025 08:32:32 AM (9 months ago)
Author:
tealium
Message:

Commit v2.1.18

Location:
tealium/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tealium/trunk/readme.txt

    r3273784 r3320426  
    44Donate link: http://tealium.com
    55Requires at least: 3.0.1
    6 Tested up to: 6.8
    7 Stable tag: 2.1.17
     6Tested up to: 6.8.1
     7Stable tag: 2.1.18
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108== Changelog ==
    109109
     110= 2.1.18 =
     111* Added input sanitization to tag config fields provided through the admin console.
     112* The 'Advanced Tag Code' feature is now disabled if 'DISALLOW_FILE_EDIT' is turned on within wp-config. Please check if this combination of settings applies before upgrading.
     113
    110114= 2.1.17 =
    111115* Bugfix - Bugfix for PHP 8.2 - provided by @anjoalre.
     
    209213== Upgrade Notice ==
    210214
     215= 2.1.18 =
     216Added input sanitization to tag config fields provided through the admin console.
     217The 'Advanced Tag Code' feature is now disabled if 'DISALLOW_FILE_EDIT' is turned on within wp-config.
     218**Important** - Please check if this combination of settings applies before upgrading.
     219
     220= 2.1.17 =
     221Bugfix - Bugfix for PHP 8.2 - provided by @anjoalre.
     222
    211223= 2.1.16 =
    212224Bugfix - Outdated use of join() on admin page impacting PHP 8 users.
  • tealium/trunk/tealium.options.php

    r2830668 r3320426  
    244244                </tr>
    245245            </table>
    246 
    247246            <h3 class="advanced"><label for="tealiumTagCode"><?php _e( 'Advanced Tag Code', 'tealium' ); ?></label></h3>
    248             <p class="description"><?php _e( 'Optional: Tealium tag code pasted below will be used instead of any account/profile/environment values entered under Basic Settings.', 'tealium' ); ?></p>
    249             <textarea name="tealiumTagCode" id="tealiumTagCode" rows="10" cols="100"><?php echo get_option( 'tealiumTagCode' ); ?></textarea>
    250 
     247            <?php
     248            if (DISALLOW_FILE_EDIT === true) {
     249                echo "This feature is not available because DISALLOW_FILE_EDIT is enabled in your Wordpress config settings.";
     250            }
     251            else {
     252                ?>
     253                <p class="description"><?php _e( 'Optional: Tealium tag code pasted below will be used instead of any account/profile/environment values entered under Basic Settings.', 'tealium' ); ?></p>
     254                <textarea name="tealiumTagCode" id="tealiumTagCode" rows="10" cols="100"><?php echo get_option( 'tealiumTagCode' ); ?></textarea>
     255                <?php
     256            }
     257            ?>
    251258            <input type="hidden" name="action" value="update" />
    252259
  • tealium/trunk/tealium.php

    r3273793 r3320426  
    44Plugin URI: http://tealium.com
    55Description: Adds the Tealium tag and creates a data layer for your WordPress site.
    6 Version: 2.1.17
     6Version: 2.1.18
    77Author: Ian Hampton
    88Author URI: http://tealium.com
     
    9898    global $pagenow;
    9999    $currentScreen = get_current_screen();
    100     $tealiumTagCode = get_option( 'tealiumTagCode' );
    101     $tealiumAccount = get_option( 'tealiumAccount' );
    102     $tealiumProfile = get_option( 'tealiumProfile' );
    103     $tealiumEnvironment = get_option( 'tealiumEnvironment' );
     100    if (DISALLOW_FILE_EDIT !== true) {
     101        $tealiumTagCode = get_option( 'tealiumTagCode' );
     102    }
     103    $tealiumAccount = sanitize_text_field( get_option( 'tealiumAccount' ) );
     104    $tealiumProfile = sanitize_text_field( get_option( 'tealiumProfile' ) );
     105    $tealiumEnvironment = sanitize_text_field( get_option( 'tealiumEnvironment' ) );
    104106
    105107    // Add an admin message when looking at the plugins page if the Tealium tag is not found
     
    150152 */
    151153function tealiumRemoveExclusions( $utagdata ) {
    152     $exclusions = get_option( 'tealiumExclusions' );
     154    $exclusions = sanitize_text_field( get_option( 'tealiumExclusions' ) );
    153155    if ( !empty( $exclusions ) ) {
    154156
     
    429431       
    430432        // Get custom namespace value if set
    431         $tealiumNamespace = get_option( 'tealiumNamespace' , 'utag_data' );
     433        $tealiumNamespace = sanitize_text_field( get_option( 'tealiumNamespace' , 'utag_data' ) );
    432434        $tealiumNamespace = ( empty( $tealiumNamespace ) ? 'utag_data' : $tealiumNamespace );
    433435        $jsondata = str_replace("\u0000*\u0000", "", $jsondata);
     
    506508function getTealiumTagCode() {
    507509    global $tealiumtag;
    508     $tealiumAdvanced = get_option( 'tealiumTagCode' );
    509     $tealiumAccount = get_option( 'tealiumAccount' );
    510     $tealiumProfile = get_option( 'tealiumProfile' );
    511     $tealiumEnvironment = get_option( 'tealiumEnvironment' );
     510    if (DISALLOW_FILE_EDIT !== true) {
     511        $tealiumAdvanced = get_option( 'tealiumTagCode' );
     512    }
     513    $tealiumAccount = sanitize_text_field( get_option( 'tealiumAccount' ) );
     514    $tealiumProfile = sanitize_text_field( get_option( 'tealiumProfile' ) );
     515    $tealiumEnvironment = sanitize_text_field( get_option( 'tealiumEnvironment' ) );
    512516    $tealiumTagType = get_option( 'tealiumTagType' );
    513517    $tealiumCacheBuster = get_option( 'tealiumCacheBuster' );
     
    560564 */
    561565function tealiumOutputUtagSync() {
    562     $tealiumAccount = get_option( 'tealiumAccount' );
    563     $tealiumProfile = get_option( 'tealiumProfile' );
    564     $tealiumEnvironment = get_option( 'tealiumEnvironment' );
     566    $tealiumAccount = sanitize_text_field( get_option( 'tealiumAccount' ) );
     567    $tealiumProfile = sanitize_text_field( get_option( 'tealiumProfile' ) );
     568    $tealiumEnvironment = sanitize_text_field( get_option( 'tealiumEnvironment' ) );
    565569    $tealiumCacheBuster = get_option( 'tealiumCacheBuster' );
    566570    $cacheBuster = "";
Note: See TracChangeset for help on using the changeset viewer.