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

No escaping of comma in 'to' field #77

Open
asyschikov opened this issue Aug 4, 2014 · 5 comments
Open

No escaping of comma in 'to' field #77

asyschikov opened this issue Aug 4, 2014 · 5 comments

Comments

@asyschikov
Copy link

msg['To'] = 'a,b <ab@example.com> will produce error, because comma separates recipients and must be escaped within one recipient.

@jamesonjlee
Copy link
Collaborator

yep, so like like #76 we should check for obviously malformed fields (but at the end of the day the Flask-Mail is the interface to SMTP (or any other mailer), so we wouldn't encode the input (breaks current behavior).

@jamesonjlee
Copy link
Collaborator

@asyschikov actually I am going to back pedal on this, validation is hard and not something flask mail is trying to provide. This is going to be a wontfix.

@asyschikov
Copy link
Author

@jamesonjlee in my opinion it is not really a validation but an escaping. If a library (flask-mail) provides setter interface like msg['To'] I would expect it to escape things that can break functioning of the protocol underneath otherwise it is leaky abstraction.

@jamesonjlee
Copy link
Collaborator

this would breaks tests for that makes sure the mailer fails on bad recipient fields, so I am still hesitant on adding something like this. At best we would be doing the same thing that the underlying connection would be doing.

@jamesonjlee
Copy link
Collaborator

oh and there is a different in behavior between 2 and 3, so maybe we should. sigh.

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

No branches or pull requests

3 participants