Fixed POP3 invalid auth error

This commit is contained in:
Andris Reinman 2018-01-10 09:01:31 +02:00
parent 33287d57ed
commit 5d2e011437

View file

@ -855,7 +855,7 @@ class POP3Connection extends EventEmitter {
return next(err);
}
if (!response.user) {
if (!response || !response.user) {
this.logger.info(
{
tnx: 'authfail',
@ -867,7 +867,7 @@ class POP3Connection extends EventEmitter {
username,
'PLAIN'
);
this.send('-ERR [AUTH] ' + (response.message || 'Username and password not accepted'));
this.send('-ERR [AUTH] ' + ((response && response.message) || 'Username and password not accepted'));
return next();
}