Removes the trimming that occurs on user input passphrases for both BIP38 encryption and brainwallet. Issue is that the BIP38 encryption input is NOT trimmed, but subsequent passphrase on Wallet Details tab is trimmed. Thus the user is able to input leading or trailing spaces to encrypt the private key, but cannot include those leading and/or trailing spaces to decrypt the private key.

This commit is contained in:
Jamie Copeland 2014-03-30 21:30:18 -04:00
parent b6fb655b3a
commit d0dfcb30df

View file

@ -8168,9 +8168,9 @@ ninja.wallets.brainwallet = {
minPassphraseLength: 15,
view: function () {
var key = document.getElementById("brainpassphrase").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var key = document.getElementById("brainpassphrase").value.toString()
document.getElementById("brainpassphrase").value = key;
var keyConfirm = document.getElementById("brainpassphraseconfirm").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var keyConfirm = document.getElementById("brainpassphraseconfirm").value.toString()
document.getElementById("brainpassphraseconfirm").value = keyConfirm;
if (key == keyConfirm || document.getElementById("brainpassphraseshow").checked) {
@ -8373,7 +8373,7 @@ ninja.wallets.detailwallet = {
document.getElementById("detailprivkeypassphrase").focus();
return;
}
var passphrase = document.getElementById("detailprivkeypassphrase").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrase = document.getElementById("detailprivkeypassphrase").value.toString()
if (passphrase == "") {
alert(ninja.translator.get("bip38alertpassphraserequired"));
return;