Sanitize auth failed on socket exception

This commit is contained in:
M66B 2019-12-06 09:00:31 +01:00
parent 87f1655f16
commit 5b8dbb8bc8
1 changed files with 6 additions and 0 deletions

View File

@ -80,6 +80,7 @@ import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.net.SocketException;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
@ -91,6 +92,7 @@ import java.util.UUID;
import java.util.concurrent.TimeoutException;
import javax.mail.Address;
import javax.mail.AuthenticationFailedException;
import javax.mail.FolderClosedException;
import javax.mail.MessageRemovedException;
import javax.mail.MessagingException;
@ -493,6 +495,10 @@ public class Log {
if (ex instanceof MessageRemovedException)
return null;
if (ex instanceof AuthenticationFailedException &&
ex.getCause() instanceof SocketException)
return null;
if (ex instanceof MessagingException &&
ex.getCause() instanceof ConnectionException &&
ex.getCause().getMessage() != null &&