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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle empty EHLO and HELO commands #112

Merged
merged 2 commits into from Nov 8, 2016
Merged

Conversation

@toxinu
Copy link
Contributor

@toxinu toxinu commented Nov 8, 2016

Related to #111.
I also add tests.

Feedbacks are welcome! 馃槃

@coveralls
Copy link

@coveralls coveralls commented Nov 8, 2016

Coverage Status

Coverage decreased (-0.02%) to 93.594% when pulling 6845bb1 on oasiswork:fix-empty-ehlo into 62cb6cd on slimta:master.

Copy link
Member

@icgood icgood left a comment

Tests look great, just requested a minor tweak on implementation and then you're good to go.

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)

This comment has been minimized.

@icgood

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
@toxinu
Copy link
Contributor Author

@toxinu toxinu commented Nov 8, 2016

Do you want that I rewrite git history in order to melt commits before merging?

@coveralls
Copy link

@coveralls coveralls commented Nov 8, 2016

Coverage Status

Coverage decreased (-0.1%) to 93.487% when pulling 2a10ef4 on oasiswork:fix-empty-ehlo into 62cb6cd on slimta:master.

@coveralls
Copy link

@coveralls coveralls commented Nov 8, 2016

Coverage Status

Coverage increased (+0.04%) to 93.653% when pulling 2a10ef4 on oasiswork:fix-empty-ehlo into 62cb6cd on slimta:master.

@icgood
icgood approved these changes Nov 8, 2016
Copy link
Member

@icgood icgood left a comment

No need to squash commits, I'll do that on merge. This looks great, thanks!

@icgood icgood merged commit d7c5608 into slimta:master Nov 8, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.04%) to 93.653%
Details
@toxinu toxinu deleted the oasiswork:fix-empty-ehlo branch Nov 9, 2016
@icgood icgood added this to the 4.0 milestone Nov 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants