semuxproject / semux-core

Semux Core
https://www.semux.org
MIT License
76 stars 31 forks source link

Exception on wallet launch and CLI is crashing on empty password #125

Closed honeycrypto closed 5 years ago

honeycrypto commented 5 years ago

v.1.5.0-RC2, latest commit of WIP PR macOS 10.14.2

1) Existing wallet.data, both CLI and GUI log this to the console as soon as I launch wallet without trying to submit any password yet:

./semux-cli.sh --network=testnet
ERROR    Wallet           org.bouncycastle.crypto.InvalidCipherTextException: pad block corrupted

2) Another test. Either due to some bug or accidentally I also created wallet with an empty password. CLI is crashing if password is empty, GUI seems to be working.

./semux-cli.sh --network=testnet
Exception in thread "main" java.lang.IllegalArgumentException: Password can not be null
    at org.semux.core.Wallet.unlock(Wallet.java:120)
    at org.semux.cli.SemuxCli.loadAndUnlockWallet(SemuxCli.java:334)
    at org.semux.cli.SemuxCli.start(SemuxCli.java:158)
    at org.semux.cli.SemuxCli.start(SemuxCli.java:142)
    at org.semux.cli.SemuxCli.main(SemuxCli.java:60)
    at org.semux.Main.main(Main.java:36)
orogvany commented 5 years ago

Those are both expected and/or existing behavior

orogvany commented 5 years ago

Err. Well #2 is a bug. Easy fix

orogvany commented 5 years ago

I can suppress the logging on #1 if you'd prefer

orogvany commented 5 years ago

fixed in RC2 branch