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

SMTP Client does not handle empty RCPT TO #1281

Closed
willpower232 opened this issue Jan 13, 2021 · 4 comments
Closed

SMTP Client does not handle empty RCPT TO #1281

willpower232 opened this issue Jan 13, 2021 · 4 comments

Comments

@willpower232
Copy link
Collaborator

For whatever reason, one of our SMTP-based clients tried to do RCPT TO:<> and was met with an exception from the following code:

https://github.com/postalhq/postal/blob/2595481b266199d8e29347dea2764f2c10202805/lib/postal/smtp_server/client.rb#L254-L256

The problem is that uname.split will not work as uname isn't defined.

I have tried the following changes to no avail

image

Stack trace:

image

I don't know any ruby really so if someone could point me in the right direction, I would appreciate it.

@SilverCard
Copy link

Try to put the return keyword before the 550 error strings, maybe without it the code continues executing.

@rbozan
Copy link

rbozan commented Jan 30, 2021

Same as #1019

What an awful bug by the way :/ even if bugs like this happen, they shouldn't just crash the postal server. Just one person has to send this one line through the smtp server and then you can say bye to receiving any new mails..

@willpower232
Copy link
Collaborator Author

Oh yeah, thanks for the link @rbozan. Fortunately, the process should be kept alive by Procodile but its not perfect.

Thanks for the tip @SilverCard, I'll try that later.

@willpower232
Copy link
Collaborator Author

closing in favour of #1019

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

No branches or pull requests

3 participants