Check if username is provided before trying plain authentication.
If the username value is not provided on the configuration file, then username if of NoneType and NULL.join will bomb since Nones can't be joined with strings. So check if username is empty and raise an exception if so. Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/558 Signed-off-by: David Miguel Susano Pinto <carandraug+dev@gmail.com> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
5f9474e10d
commit
c9005cd4ff
@ -199,6 +199,11 @@ class IMAPServer(object):
|
||||
http://tools.ietf.org/html/rfc4616"""
|
||||
|
||||
authc = self.username
|
||||
if not authc:
|
||||
raise OfflineImapError("No username provided for '%s'"
|
||||
% self.repos.getname(),
|
||||
OfflineImapError.ERROR.REPO)
|
||||
|
||||
passwd = self.__getpassword()
|
||||
authz = b''
|
||||
if self.user_identity != None:
|
||||
|
Loading…
Reference in New Issue
Block a user