Changeset 3320426
- Timestamp:
- 07/01/2025 08:32:32 AM (9 months ago)
- Location:
- tealium/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (3 diffs)
-
tealium.options.php (modified) (1 diff)
-
tealium.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tealium/trunk/readme.txt
r3273784 r3320426 4 4 Donate link: http://tealium.com 5 5 Requires at least: 3.0.1 6 Tested up to: 6.8 7 Stable tag: 2.1.1 76 Tested up to: 6.8.1 7 Stable tag: 2.1.18 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 108 108 == Changelog == 109 109 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 110 114 = 2.1.17 = 111 115 * Bugfix - Bugfix for PHP 8.2 - provided by @anjoalre. … … 209 213 == Upgrade Notice == 210 214 215 = 2.1.18 = 216 Added input sanitization to tag config fields provided through the admin console. 217 The '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 = 221 Bugfix - Bugfix for PHP 8.2 - provided by @anjoalre. 222 211 223 = 2.1.16 = 212 224 Bugfix - Outdated use of join() on admin page impacting PHP 8 users. -
tealium/trunk/tealium.options.php
r2830668 r3320426 244 244 </tr> 245 245 </table> 246 247 246 <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 ?> 251 258 <input type="hidden" name="action" value="update" /> 252 259 -
tealium/trunk/tealium.php
r3273793 r3320426 4 4 Plugin URI: http://tealium.com 5 5 Description: Adds the Tealium tag and creates a data layer for your WordPress site. 6 Version: 2.1.1 76 Version: 2.1.18 7 7 Author: Ian Hampton 8 8 Author URI: http://tealium.com … … 98 98 global $pagenow; 99 99 $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' ) ); 104 106 105 107 // Add an admin message when looking at the plugins page if the Tealium tag is not found … … 150 152 */ 151 153 function tealiumRemoveExclusions( $utagdata ) { 152 $exclusions = get_option( 'tealiumExclusions');154 $exclusions = sanitize_text_field( get_option( 'tealiumExclusions' ) ); 153 155 if ( !empty( $exclusions ) ) { 154 156 … … 429 431 430 432 // Get custom namespace value if set 431 $tealiumNamespace = get_option( 'tealiumNamespace' , 'utag_data');433 $tealiumNamespace = sanitize_text_field( get_option( 'tealiumNamespace' , 'utag_data' ) ); 432 434 $tealiumNamespace = ( empty( $tealiumNamespace ) ? 'utag_data' : $tealiumNamespace ); 433 435 $jsondata = str_replace("\u0000*\u0000", "", $jsondata); … … 506 508 function getTealiumTagCode() { 507 509 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' ) ); 512 516 $tealiumTagType = get_option( 'tealiumTagType' ); 513 517 $tealiumCacheBuster = get_option( 'tealiumCacheBuster' ); … … 560 564 */ 561 565 function 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' ) ); 565 569 $tealiumCacheBuster = get_option( 'tealiumCacheBuster' ); 566 570 $cacheBuster = "";
Note: See TracChangeset
for help on using the changeset viewer.