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

Fix _ParseConnect() #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

gryphius
Copy link

_ParseConnect() crashes if the client connects through a unix domain socket or if the protocol is "unknown" which I've actually seen happening a few times.

DEBUG:ppymilter: <<< Clocalhost=00U
ERROR:ppymilter:uncaptured python exception, closing channel <ppymilter.ppymilterserver.ConnectionHandler connected 127.0.0.1:57708 at 0x7ff4498f1998> (<class 'struct.error'>:unpack requires a string argument of length 2 [/usr/lib/python2.7/asyncore.py|read|83] [/usr/lib/python2.7/asyncore.py|handle_read_event|449] [/usr/lib/python2.7/asynchat.py|handle_read|147] [build/bdist.linux-x86_64/egg/ppymilter/ppymilterserver.py|read_milter_data|171] [build/bdist.linux-x86_64/egg/ppymilter/ppymilterbase.py|Dispatch|212] [build/bdist.linux-x86_64/egg/ppymilter/ppymilterbase.py|_ParseConnect|281])

This patch tries to handle all possible address family types from libmilter/mfdef.h

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

Successfully merging this pull request may close these issues.

1 participant