From 10514b8039c03b7a94b821f2d7fa24e0b059fcfc Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 5 May 2021 14:35:43 +0200 Subject: [PATCH] shorten mitm message to avoid alert height ellipsis --- src/main/java/com/sparrowwallet/sparrow/AppServices.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppServices.java b/src/main/java/com/sparrowwallet/sparrow/AppServices.java index f37fa157..6f5f3457 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppServices.java @@ -221,14 +221,14 @@ public class AppServices { if(tlsServerException.getCause().getMessage().contains("PKIX path building failed")) { File crtFile = Config.get().getElectrumServerCert(); if(crtFile != null && Config.get().getServerType() == ServerType.ELECTRUM_SERVER) { - AppServices.showErrorDialog("SSL Handshake Failed", "The configured server certificate at " + crtFile.getAbsolutePath() + " did not match the certificate provided by the server at " + tlsServerException.getServer().getHost() + "." + - "\n\nThis may indicate a man-in-the-middle attack!" + + AppServices.showErrorDialog("SSL Handshake Failed", "The configured server certificate at " + crtFile.getAbsolutePath() + " did not match the certificate provided by the server at " + tlsServerException.getServer().getHost() + ". " + + "This may indicate a man-in-the-middle attack!" + "\n\nChange the configured server certificate if you would like to proceed."); } else { crtFile = Storage.getCertificateFile(tlsServerException.getServer().getHost()); if(crtFile != null) { - Optional optButton = AppServices.showErrorDialog("SSL Handshake Failed", "The certificate provided by the server at " + tlsServerException.getServer().getHost() + " appears to have changed." + - "\n\nThis may indicate a man-in-the-middle attack!" + + Optional optButton = AppServices.showErrorDialog("SSL Handshake Failed", "The certificate provided by the server at " + tlsServerException.getServer().getHost() + " appears to have changed. " + + "This may indicate a man-in-the-middle attack!" + "\n\nDo you still want to proceed?", ButtonType.NO, ButtonType.YES); if(optButton.isPresent() && optButton.get() == ButtonType.YES) { crtFile.delete();