Handle empty EHLO and HELO commands #112
Merged
Conversation
Tests look great, just requested a minor tweak on implementation and then you're good to go. |
slimta/smtp/server.py
Outdated
ehlo_as = ehlo_as.decode('utf-8') | ||
reply = Reply('250', 'Hello '+ehlo_as) | ||
reply.enhanced_status_code = False | ||
self._call_custom_handler('EHLO', reply, ehlo_as) |
icgood
Nov 8, 2016
Member
I think I'd rather see this implemented as if/elif clauses at the top of the handlers, e.g.
if not self.bannered:
bad_sequence.send(self.io)
return
elif not ehlo_as:
bad_arguments.send(self.io)
return
I think I'd rather see this implemented as if/elif clauses at the top of the handlers, e.g.
if not self.bannered:
bad_sequence.send(self.io)
return
elif not ehlo_as:
bad_arguments.send(self.io)
return
Do you want that I rewrite git history in order to melt commits before merging? |
No need to squash commits, I'll do that on merge. This looks great, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Related to #111.
I also add tests.
Feedbacks are welcome!😄