pH7Software/pH7-Social-Dating-CMS

E-Mail Validation fails on /admin123 login

Opened this issue · 1 comments

Describe the bug

After entering login data for admin123 message "Your Email must be a valid email address." appears, but e-mail address is valid.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://ph7.example.com/admin123/main/login
  2. Enter admins e-mail, username and password
  3. See error

Expected Behavior

e-mail address should validate

Screenshots / Screencasts

ph7-screenshot

Workaround

To get this working, I considered following workaround:

--- Validate.class.php.ORIG	2023-07-30 04:29:28.602137792 +0000
+++ Validate.class.php	2023-07-30 04:24:20.233319333 +0000
@@ -272,6 +272,7 @@
     public function email($sEmail, $bRealHost = false)
     {
 
+        return true;
         $sEmail = filter_var($sEmail, FILTER_SANITIZE_EMAIL);
 
         if ($bRealHost) {

Hi @ip6li

Thank you for raising this concern 🙂 Returning true will completely disable the email validation check. We don't want this.

Could you share the pattern format of the email you have used? FYI, the email functions use the native PHP function filter_var with FILTER_VALIDATE_EMAIL, as follow ($sEmail, FILTER_VALIDATE_EMAIL) to determine if an email is valid or not.