Changeset 2970311
- Timestamp:
- 09/22/2023 04:55:02 PM (18 months ago)
- Location:
- wp-mailto-links
- Files:
-
- 50 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-mailto-links/trunk/core/includes/classes/class-wp-mailto-links-helpers.php
r2159924 r2970311 237 237 return ( rand(0,1) == 1 ) ? true : false; 238 238 } 239 240 /** 241 * Sanitize classes 242 * 243 * @param string $classes 244 * @param string $sep 245 * @return string 246 */ 247 public function sanitize_html_classes( $classes, $sep = " " ){ 248 $return = ""; 249 250 if( ! is_array( $classes ) ) { 251 $classes = explode( $sep, $classes ); 252 } 253 254 if( ! empty( $classes ) ){ 255 foreach( $classes as $class ){ 256 $return .= sanitize_html_class( $class ) . " "; 257 } 258 } 259 260 return $return; 261 } 239 262 240 263 } -
wp-mailto-links/trunk/core/includes/classes/class-wp-mailto-links-run.php
r2970166 r2970311 469 469 $display = $email; 470 470 } else { 471 $atts['href'] = 'mailto:'. $email;471 $atts['href'] = 'mailto:'. sanitize_email( $email ); 472 472 } 473 473 -
wp-mailto-links/trunk/core/includes/classes/class-wp-mailto-links-validate.php
r2236360 r2970311 542 542 */ 543 543 public function create_protected_mailto( $display, $attrs = array(), $protection_method = null ){ 544 545 //Escape classes 546 if( isset( $attrs['class'] ) ){ 547 $attrs['class'] = WPMT()->helpers->sanitize_html_classes( $attrs['class'] ); 548 } 549 550 //Escape titles 551 if( isset( $attrs['title'] ) ){ 552 $attrs['title'] = esc_html( $attrs['title'] ); 553 } 554 544 555 $email = ''; 545 556 $class_ori = ( empty( $attrs['class'] ) ) ? '' : $attrs['class']; … … 570 581 } else { 571 582 // get email from href 572 $email = s ubstr($value, 7);583 $email = sanitize_email( substr($value, 7) ); 573 584 574 585 $encoded_email = $this->get_encoded_email( $email ); … … 580 591 581 592 } else { 582 $link .= $key . '="' . $value. '" ';593 $link .= $key . '="' . esc_js( $value ) . '" '; 583 594 } 584 595 } -
wp-mailto-links/trunk/readme.txt
r2970166 r2970311 4 4 Requires at least: 4.7 5 5 Tested up to: 6.2 6 Stable tag: 3.1. 36 Stable tag: 3.1.4 7 7 Requires PHP: 5.3.2 8 8 License: GPLv2 or later … … 109 109 110 110 == Changelog == 111 112 = 3.1.4: September 22, 2023 = 113 * Security Patch for XSS vulnerability within the create_protected_mailto() function (Thanks to Wordfence) 111 114 112 115 = 3.1.3: September 22, 2023 = -
wp-mailto-links/trunk/wp-mailto-links.php
r2970166 r2970311 2 2 /** 3 3 * Plugin Name: WP Mailto Links - Hide & Protect Emails 4 * Version: 3.1. 34 * Version: 3.1.4 5 5 * Plugin URI: https://wordpress.org/plugins/wp-mailto-links/ 6 6 * Description: Protect & encode email addresses and mailto links from spambots & spamming. Easy to use - encodes emails out-of-the-box. … … 23 23 24 24 // Plugin version. 25 define( 'WPMT_VERSION', '3.1. 3' );25 define( 'WPMT_VERSION', '3.1.4' ); 26 26 27 27 // Determines if the plugin is loaded
Note: See TracChangeset
for help on using the changeset viewer.