From 6b534953dee46a7dbb92aa662d91bcc7a0247e40 Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 5 Jul 2013 15:11:38 +0700 Subject: [PATCH] fixing error if you dont supply an argument --- src/class_smtpServer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/class_smtpServer.py b/src/class_smtpServer.py index c9d52daa..796e30af 100644 --- a/src/class_smtpServer.py +++ b/src/class_smtpServer.py @@ -141,7 +141,12 @@ class bitmessageSMTPChannel(asynchat.async_chat): self.push('250 %s' % self.__fqdn) def smtp_AUTH(self, arg): - encoding, pw = arg.split(' ') + try: + encoding, pw = arg.split(' ') + except ValueError: + self.invalid_command('501 Syntax: AUTH PLAIN auth') + return + if encoding != 'PLAIN': self.invalid_command('501 method not understood') return