diff --git a/src/cpp/Crypto/KeyPair.cpp b/src/cpp/Crypto/KeyPair.cpp index 09944b2d4..d4570e588 100644 --- a/src/cpp/Crypto/KeyPair.cpp +++ b/src/cpp/Crypto/KeyPair.cpp @@ -53,6 +53,7 @@ bool KeyPair::generateFromPassphrase(const char* passphrase, Mnemonic* word_sour unsigned char word_cursor = 0; for (size_t i = 0; i < pass_phrase_size; i++) { if (passphrase[i] == ' ') { + if(buffer_cursor < 3) continue; if (word_source->isWordExist(acBuffer)) { word_indices[word_cursor] = word_source->getWordIndex(acBuffer); } diff --git a/src/cpp/model/User.cpp b/src/cpp/model/User.cpp index ec1739209..83ea806f4 100644 --- a/src/cpp/model/User.cpp +++ b/src/cpp/model/User.cpp @@ -1014,7 +1014,7 @@ bool User::setPrivKey(const MemoryBin* privKey) auto encyrptedPrivKey = encrypt(privKey); lock("User::setPrivKey"); mState = USER_COMPLETE; - mPrivateKey = encrypt(privKey); + mPrivateKey = encyrptedPrivKey;// encrypt(privKey); unlock(); return true; diff --git a/src/cpp/tasks/SigningTransaction.cpp b/src/cpp/tasks/SigningTransaction.cpp index eaf084a3e..79534389a 100644 --- a/src/cpp/tasks/SigningTransaction.cpp +++ b/src/cpp/tasks/SigningTransaction.cpp @@ -184,7 +184,7 @@ int SigningTransaction::run() { } catch (Poco::Exception& e) { addError(new ParamError("SigningTransaction", "connect error to php server", e.displayText().data())); - printf("url: %s\n", ServerConfig::g_php_serverHost); + printf("url: %s\n", ServerConfig::g_php_serverHost.data()); sendErrorsAsEmail(); return -8; }