diff --git a/CHANGELOG.md b/CHANGELOG.md index ee182b874..594194e33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.7.39 +## 01/02/2023 + +1. [](#bugfix) + * Fixed an issue with `email` validation that was failing on UTF-8 characters. Following best practices and now only check for `@` and length. + # v1.7.38 ## 01/02/2023 @@ -7,7 +13,6 @@ * Vendor library updates to latest versions * Updated `bin/composer.phar` to latest `2.4.4` version [#3627](https://github.com/getgrav/grav/issues/3627) 1. [](#bugfix) - * Don't fail hard if pages recurse with same path * Github workflows security hardening [#3624](https://github.com/getgrav/grav/pull/3624) diff --git a/system/src/Grav/Common/Data/Validation.php b/system/src/Grav/Common/Data/Validation.php index a551fb56a..6deb93190 100644 --- a/system/src/Grav/Common/Data/Validation.php +++ b/system/src/Grav/Common/Data/Validation.php @@ -638,7 +638,7 @@ class Validation $values = !is_array($value) ? explode(',', preg_replace('/\s+/', '', $value)) : $value; foreach ($values as $val) { - if (!(self::typeText($val, $params, $field) && filter_var($val, FILTER_VALIDATE_EMAIL))) { + if (!(self::typeText($val, $params, $field) && strpos($val, '@', 1))) { return false; } }