pH7Software / pH7-Social-Dating-CMS

😻 pH7Builder (formerly pH7CMS) is a Professional & Open Source Social Dating CMS written in PHP 8 🚀 This Social Dating Script aims to be low resource-intensive, powerful and secure. pH7Builder includes over 40 modules. It is the first Professional, Free & Open Source Social Dating Site Builder Software and the first choice for enterprise level Da
https://pH7Builder.com
MIT License
971 stars 578 forks source link

E-Mail Validation fails on /admin123 login #1126

Open ip6li opened 1 year ago

ip6li commented 1 year ago

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) {
pH-7 commented 1 year ago

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.