diff --git a/README.md b/README.md index a7f9cef..84d4048 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Easily add [Wide Angle Analytics](https://wideangle.co) tracker script to your W * Requires at least: 5.2 -* Tested up to: 5.8.2 +* Tested up to: 6.1.1 * Requires PHP: 7.2 diff --git a/readme.txt b/readme.txt index 2550ca7..32f7ea7 100644 --- a/readme.txt +++ b/readme.txt @@ -2,9 +2,9 @@ Contributors: jrozanski,inputobjects Tags: web analytics, tracking, web traffic, analytics, statistics, stats Requires at least: 5.2 -Tested up to: 5.8.2 +Tested up to: 6.1.1 Requires PHP: 7.2 -Stable tag: 1.0.6 +Stable tag: 1.0.7 License: GPLv2 Easily add Wide Angle Analytics tracker script to your WordPress site. You can quickly configure your web analytics tracker script. @@ -61,6 +61,10 @@ We run a business around serving the needs of our customer. That's you. You will find most of your answers in the [Knowledge Base](https://wideangle.co/documentation). Should you require further assistance, please [get in touch](https://wideangle.co/support) with our team. == Changelog == +V1.0.7 +- Fix configuration of custom RegEx in the exclusion paths +- Test with WordPress 6.1.1 + V1.0.6 - Support for ePrivacy Mode configuration. diff --git a/types/WideAngleHelpers.php b/types/WideAngleHelpers.php index d9029d9..25ac3bd 100644 --- a/types/WideAngleHelpers.php +++ b/types/WideAngleHelpers.php @@ -85,9 +85,10 @@ class WideAngleHelpers { if(preg_match(self::excludePathRequestKeyPattern, $key, $idx)) { $valueKey = "waa_exc_path_".$idx[1]."_value"; $sanitizedValue = trim(sanitize_text_field($request[$valueKey])); - if($sanitizedValue != null) { - if(filter_var($sanitizedValue, FILTER_VALIDATE_REGEXP)) { - $typedExclusion = "[" . $exclusionType . "]" . $sanitizedValue; + if($sanitizedValue != null) { + $asRegExp = "/" . wp_unslash($sanitizedValue) . "/"; + if(@preg_match($asRegExp, null) === 0) { + $typedExclusion = "[" . $exclusionType . "]" . wp_unslash($sanitizedValue); array_push($exclusions, $typedExclusion); } else { $typedExclusion = "[" . $exclusionType . "]" . filter_var($sanitizedValue, FILTER_SANITIZE_SPECIAL_CHARS); diff --git a/wide-angle-analytics.php b/wide-angle-analytics.php index a80139a..a9d8325 100644 --- a/wide-angle-analytics.php +++ b/wide-angle-analytics.php @@ -5,7 +5,7 @@ Description: Easily enable and configure Wide Angle Analytics on your Wordpress site Author: Wide Angle Analytics by Input Objects GmbH Author URI: https://wideangle.co - Version: 1.0.6 + Version: 1.0.7 Requires at least: 5.2 Requires PHP: 7.2 License: GPL v2