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

bug: Valid Email address not recognised as such #4696

Open
wischi-chr opened this issue Nov 13, 2024 · 1 comment
Open

bug: Valid Email address not recognised as such #4696

wischi-chr opened this issue Nov 13, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@wischi-chr
Copy link

wischi-chr commented Nov 13, 2024

Describe the bug

The E-Mail validator is probably a bit too restrictive. I use the TLD .email for my email address (like [email protected]), but windmill reports "invalid email address".

To reproduce

  1. Setup new instance
  2. Enter [email protected] on the "Setup Secure Account" page
  3. "invalid email address"

Expected behavior

Valid E-Mail addresses can be used during account setup

Application version

Latest docker image (Windmill Community Edition v1.423.1)

@wischi-chr wischi-chr added the bug Something isn't working label Nov 13, 2024
@N4v41
Copy link

N4v41 commented Nov 16, 2024

It looks that the regex is parsing 2 to 4 chars in the tld of e-mail so if the tld is longer it fails the check:

pattern = '^[\\w-+.]+@([\\w-]+\\.)+[\\w-]{2,4}$'

I was trying to look at the maximum characters in a tld but i didin't find the correct rfc for that, for e-mails the maximum length is 255 per rfc3696 the domain part should not exceed 63.
on rfc6927 the longest domain name for a country tld is "XN--MGBERP4A5D4AR" wich is a punycode for ("السعودية") saudi arabia domain name.
on the tld list provided by iana looks like the longest tld is "XN--VERMGENSBERATUNG-PWB"("vermögensberatung"), so is quite lengthy using 25 chars.

did some tests, and increasing to 25 chars it would accept practically any current registered domain tld:
image
but, I don't know if this would have any other negative impacts in the database for example.
to be a little bit more practical, maybe 20 chars would be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants