getgrav / grav-plugin-login

Grav Login Plugin
http://getgrav.org
MIT License
44 stars 54 forks source link

New user registration - Not a valid email address #302

Open derhamproductions opened 4 months ago

derhamproductions commented 4 months ago

When registering a new user with an email that passes the HTML5 email field check but doesn't pass the grav email filter check a 500 error is shown instead of passing back to the user to check their input.

Specific case if the input is "test@test" "test@test." correctly recognised as invalid

user\plugins\login\classes\Login.php line 400

case 'email':
                $value = \is_string($value) ? trim($value) : '';
                if ($value === '' || !filter_var($value, FILTER_VALIDATE_EMAIL)) {
                    throw new \RuntimeException('Not a valid email address');
                }

                break;

Clean Install - only option changed is user registration to enabled Grav v1.7.44
Admin v1.10.44
Form v7.3.0 Login v3.7.7