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

Many invalid characters are allowed in domain part of email addresses #223

Open
rklingsberg opened this issue Feb 14, 2019 · 0 comments
Open

Comments

@rklingsberg
Copy link

I found this while testing flanker:

from flanker.addresslib import address
for sym in ('`', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '^', '_', '{', '|', '}', '~'):
    addr = 'addr@example{}com'.format(sym)

    if address.parse(addr, addr_spec_only=True, strict=True):
        print('{}\tVALID'.format(addr))
    else:
        print('{}\tINVALID'.format(addr))
addr@example`com        VALID
addr@example!com        VALID
addr@example"com        INVALID
addr@example#com        VALID
addr@example$com        VALID
addr@example%com        VALID
addr@example&com        VALID
addr@example'com        VALID
addr@example(com        INVALID
No handlers could be found for logger "flanker.addresslib._parser.lexer"
addr@example)com        INVALID
addr@example*com        VALID
addr@example+com        VALID
addr@example,com        INVALID
addr@example-com        VALID
[email protected]        VALID
addr@example/com        VALID
addr@example:com        INVALID
addr@example;com        INVALID
addr@example<com        INVALID
addr@example=com        VALID
addr@example>com        INVALID
addr@example?com        VALID
addr@example@com        INVALID
addr@example^com        VALID
addr@example_com        VALID
addr@example{com        VALID
addr@example|com        VALID
addr@example}com        VALID
addr@example~com        VALID

I'm sorry to say I'm not sure how to fix this, but I wanted to let you know.

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