Merge pull request #1581 from ManfredKarrer/protobuffer-exception-handling

Handle unknown PB data from encrypted messages
This commit is contained in:
Manfred Karrer 2018-06-22 18:39:11 +02:00 committed by GitHub
commit 0cc4f7b646
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,6 +88,7 @@ import bisq.common.app.Version;
import bisq.common.crypto.CryptoException; import bisq.common.crypto.CryptoException;
import bisq.common.crypto.KeyRing; import bisq.common.crypto.KeyRing;
import bisq.common.crypto.SealedAndSigned; import bisq.common.crypto.SealedAndSigned;
import bisq.common.proto.ProtobufferException;
import bisq.common.storage.CorruptedDatabaseFilesHandler; import bisq.common.storage.CorruptedDatabaseFilesHandler;
import org.bitcoinj.core.Address; import org.bitcoinj.core.Address;
@ -807,7 +808,7 @@ public class MainViewModel implements ViewModel {
} else { } else {
throw new CryptoException("Payload not correct after decryption"); throw new CryptoException("Payload not correct after decryption");
} }
} catch (CryptoException e) { } catch (CryptoException | ProtobufferException e) {
e.printStackTrace(); e.printStackTrace();
String msg = Res.get("popup.warning.cryptoTestFailed", e.getMessage()); String msg = Res.get("popup.warning.cryptoTestFailed", e.getMessage());
log.error(msg); log.error(msg);