Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding at alias/email address with @ symbol in the local part causes error #680

Open
NicoloLazzaroni opened this issue Nov 10, 2022 · 0 comments

Comments

@NicoloLazzaroni
Copy link

Hello,

PostfixAdmin does not check if a user adds a second @ in the localpart of the email address.

If the user does it for an email account then the system pops up with the error: Regex check failed.

Eg. Regex check failed for test@abc.eu@abc.eu

I could solve it by adding this code in the functions.php file, inside the function "check_email":

    if (substr_count($ce_email,"@") != 1) {
       return sprintf("Please, do not insert the '@' (at) symbol.", htmlentities($email));
    }

    if (substr_count($email,"@") != 1) {
       return sprintf("Please, do not insert the '@' (at) symbol.", htmlentities($email));
    }

The main issues, however, happens with the aliasses:
If the user adds a second @ in the local part, unless after the "at" symol there is the same domain name of the chosen domain, PA produces a 500 error in the console and a blank page. The check I added is not run so the problem is before the call to check_email.

Thank you for your time.

Regards,
NL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant