fix for email validation

This commit is contained in:
Andy Miller
2023-01-11 16:16:52 -07:00
parent 8c261a05cc
commit 4f0fee684a
2 changed files with 7 additions and 2 deletions

View File

@@ -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)

View File

@@ -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;
}
}