Filter certificate exceptions

This commit is contained in:
M66B 2020-02-02 15:24:24 +01:00
parent 16f7e79707
commit 9e6286cad8
1 changed files with 5 additions and 0 deletions

View File

@ -99,6 +99,7 @@ import javax.mail.MessagingException;
import javax.mail.Part;
import javax.mail.StoreClosedException;
import javax.mail.internet.InternetAddress;
import javax.net.ssl.SSLPeerUnverifiedException;
public class Log {
private static final int MAX_CRASH_REPORTS = 5;
@ -304,6 +305,10 @@ public class Log {
"Resetting to invalid mark".equals(ex.getMessage())))
return false;
if (ex instanceof SSLPeerUnverifiedException ||
ex instanceof EmailService.UntrustedException)
return false;
// Rate limit
int count = prefs.getInt("crash_report_count", 0) + 1;
prefs.edit().putInt("crash_report_count", count).apply();